.
.
.
‘man/flint-class.Rd’ contained a cut-paste error
affecting section ‘Methods’, items [[
and
[[<-
.
.
.
.
.
.
C library functions
arb_hypgeom_gamma_lower
, acb_hypgeom_gamma_lower
,
arb_hypgeom_gamma_upper
, acb_hypgeom_gamma_upper
,
arb_hypgeom_beta_lower
, and acb_hypgeom_beta_lower
,
which implement the incomplete gamma and beta functions, are
interfaced as R functions with identical names and prototypes.
Requested by Martin Maechler (GH#5).
R functions arb_hypgeom_beta
and
acb_hypgeom_beta
wrapping arb_hypgeom_gamma
and
acb_hypgeom_gamma
are provided for completeness.
FLINT provides no such entry points as of this writing.
.
R function complex.runif
facilitating
complex-valued RNG in examples and tests.
Function R_flint_abort
is declared with keyword macro
FLINT_NORETURN
conditionally, for compatibility with
FLINT 3.0.
‘configure’ tests for function d_mul_2exp
and
‘src/mag.c’ uses d_mul_2exp
conditionally, for
compatibility with FLINT 3.0.
‘configure’ works around broken ‘flint.pc’ installed by FLINT 3.0.
‘configure’ uses simpler prerequisite code when testing whether system header ‘flint/flint.h’ can be compiled.
‘src/noreturn.h’ is much refined, for compatibility
with FLINT 3.0. The original version triggered
clang
-Wunknown-attributes.
‘src/revertnoreturn.h’ is included after the FLINT headers so that definitions in ‘src/noreturn.h’ do not infect headers included later.
An array declaration in ‘src/flint.h’ specified an
incorrect (too small) array size, triggering gcc
-Wlto-type-mismatch. Thanks to Brian Ripley for the
report.
‘src/noreturn.h’ is included before the FLINT
headers. FLINT 3.1 installs a broken
‘flint/flint.h’ whose use of keyword _Noreturn
and
keyword macro noreturn
is not portable. Thanks to Brian
Ripley for the report.
‘configure’ wrongly assumed that ‘Rinternals.h’ must be located in ‘'R RHOME'/include’. Thanks to Dirk Eddelbuettel for the report (GH#3).
More pointers are zero-initialized to appease
clang
-Wsometimes-uninitialized.
The package is titled “Fast Library for Number Theory”, matching FLINT.
Mikael Jagan is the maintainer and sole author.
Depends: R (>= 4.3)
mainly for KaTeX support when
rendering Rd to HTML and ‘amsmath’ support when rendering Rd
to PDF.
Depends: methods
as flint defines S4 classes,
generic functions, and methods.
Imports: stats
as flint provides S3 and S4
methods for quantile
.
SystemRequirements: flint (>= 3), mpfr (>= 3.1), gmp
as flint links FLINT, GNU
MPFR, and GNU MP. The version
requirements are purely informational, as ‘configure’ and
‘configure.win’ scripts check that features used by the
package are available.
A ‘configure’ script is provided for installation under
Unix. The script uses pkg-config
where available to
determine options for linking FLINT, GNU
MPFR, and GNU MP. The user can set
environment variables PKG_CONFIG and PKG_CONFIG_PATH
to control how pkg-config
is invoked and where it
searches for ‘*.pc’ files. The script gives precedence to
environment variables R_FLINT_CPPFLAGS,
R_FLINT_CFLAGS, R_FLINT_LDFLAGS, and
R_FLINT_LIBS: if any of these is set, then the script does
not use pkg-config
. In that case, R_FLINT_LIBS
gets a default value -lflint -lmpfr
-lgmp. The other R_FLINT_* are empty by default.
A ‘configure.win’ script is provided for installation under Windows. Currently, it invokes ‘configure’, passing along positional parameters, and does nothing else.
S4 classes, generic functions, and methods are documented
under help topics with keyword classes
or methods
.
Interfaces to special mathematical functions are documented under
help topics with keyword math
. One can use
help(package = "flint")
or (for example)
help.search(package = "flint", keyword = "math")
to get a
list of (non-internal) help topics.
Virtual class flint
with nonvirtual subclasses
ulong
, slong
, fmpz
, fmpq
, mag
,
arf
, acf
, arb
, and acb
. Objects can
be understood as vectors of length at most 2^32-1
or
2^64-1
(depending on the ABI) of the so-named C
types. The implementation is based on external pointers.
ulong
and slong
represent vectors of fixed
precision unsigned and signed integers. The integer size is 32 or
64 bits (depending on the ABI).
fmpz
represents vectors of arbitrary precision signed
integers.
fmpq
represents vectors of arbitrary precision
rational numbers, always in “canonical” form with numerator
and positive, coprime denominator
mag
represents vectors of fixed precision error
bounds.
arf
and acf
represent vectors of arbitrary
precision floating-point real and complex numbers.
arb
and acb
represent vectors of arbitrary
precision floating-point real and complex numbers with error
bounds. They support “ball arithmetic”.
S4 generic functions Num
, Num<-
, Den
,
and Den<-
for getting and setting numerators and
denominators of quotients.
S4 generic functions Mid
, Mid<-
, Rad
,
and Rad<-
for getting and setting midpoints and radii of
balls in a metric space.
S4 generic functions Real
, Real<-
,
Imag
, and Imag<-
for getting and setting real and
imaginary parts of complex numbers.
S4 methods are defined for generic functions [
,
[<-
, [[
, [[<-
, Complex
, Den
,
Den<-
, Imag
, Imag<-
, Math
,
Math2
, Mid
, Mid<-
, Num
, Num<-
,
Ops
, Rad
, Rad<-
, Real
, Real<-
,
Summary
, all.equal
, anyDuplicated
,
anyNA
, as.raw
, as.logical
, as.integer
,
as.numeric
, as.complex
, as.vector
,
as.matrix
, as.array
, as.data.frame
,
as.Date
, as.POSIXct
, as.POSIXlt
,
coerce
, cut
, duplicated
, findInterval
,
format
, initialize
, is.finite
,
is.infinite
, is.na
, is.na<-
, is.nan
,
is.unsorted
, length
, length<-
, match
,
mean
, mtfrm
, names
, names<-
,
print
, quantile
, rep
, rep.int
,
rep_len
, show
, seq
, sequence
,
summary
, unique
, and xtfrm
.
S3 methods are defined for S3-turned-S4 generic functions. These methods call the S4 generic function so that S4 dispatch occurs if the S3 generic function is called.
Generator functions for each of the nonvirtual subclasses of
virtual class flint
.
C library functions arb_const_pi
,
arb_const_log2
, arb_const_log10
, arb_const_e
,
arb_lambertw
, acb_lambertw
,
arb_dirichlet_zeta
, acb_dirichlet_zeta
,
arb_dirichlet_hurwitz
, acb_dirichlet_hurwitz
,
acb_dirichlet_lerch_phi
,
arb_hypgeom_gamma
, acb_hypgeom_gamma
,
arb_hypgeom_rgamma
, acb_hypgeom_rgamma
,
arb_hypgeom_lgamma
, acb_hypgeom_lgamma
,
acb_hypgeom_polygamma
,
arb_hypgeom_2f1
, and acb_hypgeom_2f1
acb_polygamma
, acb_dirichlet_zeta
,
acb_dirichlet_hurwitz
, acb_dirichlet_lerch_phi
,
acb_hypgeom_gamma
, acb_hypgeom_rgamma
,
acb_hypgeom_lgamma
, and acb_hypgeom_2f1
are interfaced as R functions with identical names and
“prototypes”. Arguments are coerced to the correct class
and recycled internally.
R function flintABI
returning the size in bits of
C type mp_limb_t
, either 32 or 64. The value is
determined at configure time.
R function flintIdentical
for testing whether
two flint
vectors have identical class, length, and
“content”. This test is less strict than the test for
pointer equality done by identical(x, y)
when x
and y
are external pointers.
R function flintLength
for getting the length of a
flint
vector as a ulong
vector or, optionally, as a
traditional numeric vector subject to rounding error.
R functions flintPrec
and flintRnd
for
getting and setting the global default precision and rounding
modes.
R function flintSize
for calculating the number of
bytes used by a flint
vector.
R function flintTriple
returning a character
vector of length 3 of the form c(class, length, address)
,
useful if details about a flint
vector must be printed.
R function flintVersion
returning a list
containing header and library versions for FLINT,
GNU MPFR, and GNU MP.
Header versions are determined at compile time. Library versions
are determined at run time.