Changes in version 0.1.5 Description o . Compatibility o . Installation o . Documentation o . Significant User-Visible Changes o . Deprecated and Defunct o . Classes o . Generic Functions o . Methods o An S4 method is defined for made-generic function toeplitz. New Features o . Bug Fixes o Typos in acb_hypgeom_bessel_[jyik] caused segfaults. C functions were passed arb objects instead of acb ones. Internals o . Changes in version 0.1.4 (2025-12-19) Compatibility o C function ATTRIB was called in a few places despite not belonging to R's C API. Installation o Installation failed on some platforms due to labels without statements in several src/*.c. Changes in version 0.1.3 (2025-12-18) Description o The maintainer e-mail address is updated. Compatibility o Tests of .initForeign("Rmpfr") are skipped if Rmpfr is too old. Versions older than 1.1-2 did not detect sizeof(mpfr_exp_t) != sizeof(mp_limb_t), so they could initialize mpfr1 objects with exp slot of wrong length. Documentation o Topic flint-class wrongly stated that the S3 default method for diff works for x inheriting from virtual class flint. o Topic format-methods wrongly stated that methods for x inheriting from arb or acb required rnd of length 2. Generic Functions o S4 generic functions isSigned, isComplex, and isFloating for testing whether the type or class of the argument represents signed, complex, and floating-point numbers, respectively. Methods o S4 methods are defined for generic (or made-generic) functions diff, diffinv, kronecker, and outer. o S4 methods for group generic functions Complex and Math are more completely implemented for classes mag, arf, and acf, for parity with classes arb and acb. o / is implemented for acf. ^ is implemented for arf and acf. %% and %/% are implemented for mag, arf and arb. o S4 generic functions Real, Real<-, Imag, and Imag<- gain sensible default methods. New Features o Class generator functions gain arguments prec and rnd (or rnd.mag) where appropriate providing users with greater control over conversions. For example, by passing non-NULL prec, one can convert inexactly even if exact conversion is possible. o R function flintRndMag for getting and setting the global default rounding mode for mag. S4 methods for format gain a new argument rnd.mag, parallel to digits.mag. o R functions asMatrix and asArray, analogues of asVector. o R functions arb_integrate and acb_integrate for integration of functions of one variable. o R function arf_rk for numerical solution of systems of ordinary differential equations. o R functions arb_hypgeom_polygamma and arb_dirichlet_lerch_phi are provided for symmetry with the acb_* ones, which they wrap. FLINT provides no such entry points as of this writing. o The global default precision, which one gets and sets with R function flintPrec, may now be an object of class slong. Previously, only numeric (of type integer or double) values were supported. o The limits of ulong and slong are available as objects ULONG_MAX, SLONG_MIN, and SLONG_MAX, defined at load time according to the ABI. o Class generator functions support conversion from midpoint-radius interval types to point types, taking midpoints and discarding radii. o Conversion from complex types to real types warns about nonzero imaginary parts. Conversion from midpoint-radius interval types to point types warns about nonzero radii. Bug Fixes o all.equal(x, y, check.class = FALSE) failed to detect numerical differences between x and y, returning TRUE incorrectly when it detected no other differences. o asVector(x, strict = FALSE) did not correctly handle data frames x. o tcrossprod(x, y) misbehaved when neither x nor y was a matrix, throwing an error when the lengths were not equal and triggering a segfault when they were. o Row and column labels were not printed for arrays of length zero. o Segments of names(c(...)) corresponding to a tagged argument of c were not constructed correctly when the tagged argument was named or when it was unnamed and of unit length. o as.character passes digits.mag = 8L to format. One method gave too many digits and others gave too few. o Arg(x) wrongly gave sign(x) times pi for x of class mag, arf, or arb. o mag(0)/mag(0) and mag(Inf)/mag(Inf) wrongly returned mag(Inf). Now they signal an error. o Conversion to ulong or slong of NaN, -Inf, or Inf stored as mag or arf signaled an unhelpful error (“caught exception”). o diag<- assigned to entries in the first row rather than to entries in the main diagonal. o Conversion from flint to atomic withholds warnings until after memory is freed, in case warnings are caught by a handler. Internals o C function newObject is modified so that it finds class definitions also when called from .onLoad. o C function newFlint, simplifying low level instantiation of flint objects. o Conditional definitions of functions tested by macro AC_CHECK_FUNCS are centralized in src/fallback.c. Declarations are provided by src/fallback.h. o Enumerated types R_flint_ops2_t and R_flint_ops1_t designating binary and unary operations, used by R_flint_*_op2 and R_flint_*_ops1 as indices of switch statements. Changes in version 0.1.2 (2025-10-10) Compatibility o Installation of flint version 0.1.1 failed under R versions 4.[3-4].z because the non-generic function asplit in base did not admit a formal argument drop. Compatibility is restored by conditional definition in .onLoad of the S4 generic function and S4 method with signature c(x = "flint"). Changes in version 0.1.1 (2025-10-08) Description o Enhances: Rmpfr, gmp as .initForeign defines methods for their classes. Documentation o There was a typo in man/arb_hypgeom_bessel_j.Rd, in the modified Bessel's equation, affecting only HTML and PDF output. Methods o S4 methods are defined for generic (or made-generic) functions aperm and asplit. o S4 methods for anyDuplicated, duplicated, and unique are amended to handle arrays x. Accordingly they all gain an argument MARGIN with default value 1L. o summary coerces to data frame and dispatches when its argument is a matrix, following summary.matrix. o print gains an argument base, which it passes to format. New Features o R functions flintBits and flintBitsAccurate can be used to get the number of bits necessary for exact representation of an integer or floating type number and the number of bits of an interval midpoint whose accuracy is guaranteed given the interval radius. These are experimental and so only partially documented. o R function .initForeign can be used to define coercions between classes in flint and analogous classes in external packages, currently Rmpfr or gmp. Bug Fixes o Calls to norm matching signature c(x = "flint", type = "missing") signaled an error due to dispatch ambiguity, for some reason not detected by the call to testInheritedMethods in tests/ambiguity.R. o Calls to colSums and friends whose return value would have length zero allowed undefined behaviour (divide-by-zero in integer division). o Calls to cbind and rbind could fill dimension names incorrectly when obtaining components from the call. Only the second component of the call (corresponding to the first actual argument) was “seen”. o as.data.frame signaled an error when its argument was an array due to a “too late” assignment. o Summary transferred attributes from its argument to its return value, in methods for classes ulong and slong. o mtfrm passes digits.mag = 0L to format so that mag vectors are also formatted exactly. Internals o External pointers are cleared by their finalizers. Changes in version 0.1.0 (2025-09-21) Description o Martin Maechler is a contributor. Significant User-Visible Changes o See section ‘Classes’ for backwards incompatible changes to the definition of virtual class flint. o The class generator functions .ulong, .slong, ... are removed and replaced with pairs of class generator functions ulong, slong, ... and ulong.array, slong.array, ... with much nicer usage; see, e.g., help("ulong") for details. o S4 methods for initialize, which were nonstandard by virtue of not calling callNextMethod in order to dispatch the default method, are removed in order to facilitate calls to new by expert users wanting to set slots directly (rather than indirectly through class generator functions) or wanting to instantiate class extensions with additional slots, e.g., new("ulongWithExtraSlot", , extra = .). Users relying on the earlier behaviour of new should start using the documented class generator functions. o R function flintIdentical is removed and replaced by an S4 method for made-generic function identical. Classes o Virtual class flint gains slots dim and dimnames, enabling representation of arrays. Methods for flint and subclasses must handle these slots exactly as default methods handle the so-named attributes of traditional vectors. o Virtual class flint accepts NULL as a valid value for its names slot. NULL is used instead of character(0L) to indicate that an object is unnamed. Now character(0L) is valid only for objects of length zero. o New classes OptionalInteger, OptionalList, and OptionalCharacter, defined as unions of NULL and integer, list, or character. They are used for slots dim, dimnames, and names of virtual class flint. Methods o Many existing S4 methods are amended to handle changes in the definition of virtual class flint, in particular to handle arrays. Notably, S4 methods for [, [<-, [[, and [[<- are refactored completely to support array subscripts. o S4 methods are defined for generic (or made-generic) functions %*%, backsolve, cbind2, chol, chol2inv, colMeans, colSums, det, determinant, diag, diag<-, dim, dim<-, dimnames, dimnames<-, drop, is.array, is.matrix, isSymmetric, norm, rbind2, rowMeans, rowSums, solve, t, and tcrossprod. It is not a coindicence that these are all more or less array-specific. o 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. o S4 methods are defined for generic functions $ and $<-, signaling an informative error. o An S4 method is defined for made-generic function identical so that .xData slots are handled specially when two flint objects are compared. New Features o C library functions arb_hypgeom_bessel_j, acb_hypgeom_bessel_j, arb_hypgeom_bessel_y, acb_hypgeom_bessel_y, arb_hypgeom_bessel_i, acb_hypgeom_bessel_i, arb_hypgeom_bessel_k, and acb_hypgeom_bessel_k, which implement the Bessel and modified Bessel functions, are interfaced as R functions with identical names and prototypes. Requested by Martin Maechler. o R function flintClass for getting the name of the direct nonvirtual subclass of virtual class flint from which the argument inherits, e.g., "ulong" if the class of the argument is "ulong" or "ulongExtension". o R function asVector for coercion to basic vector classes and flint vector classes, optionally preserving attributes (at least dim, dimnames, names). It handles attributes more uniformly than as.vector and as, which may or may not drop attributes depending on the class of the argument and the target class. o R functions cbind.flint and rbind.flint, similar in purpose to c.flint, enabling users to bypass the internal dispatch mechanism of cbind and rbind. o It is now defined how flintLength and flintSize handle arguments not inheriting from virtual class flint. o Mid and Mid<- are implemented for class acb, getting and setting the complex midpoint. Thanks to Martin Maechler for the suggestion and patch (GH#15). o S4 methods for format gain argument digits.mag and use that instead of digits to format mag and mag components of arb and acb. The S4 method for print gains the same argument, passing it to format. Bug Fixes o Due to a copy-paste bug, Mid(x) <- value never worked for x of class arb and Imag(z) <- value never worked for z of class acf or acb. Thanks to Martin Maechler for the report and patch (GH#15). Changes in version 0.0.5 (2025-05-27) Installation o configure tests for flint/flint.h from FLINT 3.1 more explicitly, and src/noreturn.h uses the result of this test. Thanks to Brian Ripley for checks linking FLINT 3.2. o configure.ac calls macro AC_RUN_IFELSE instead of macro AC_COMPILE_IFELSE where the former was always intended. Changes in version 0.0.4 (2025-03-24) Documentation o man/flint-class.Rd contained a cut-paste error affecting section ‘Methods’, items [[ and [[<-. New Features o 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). o 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. Internals o R function complex.runif facilitating complex-valued RNG in examples and tests. Changes in version 0.0.3 (2025-02-23) Installation o Function R_flint_abort is declared with keyword macro FLINT_NORETURN _conditionally_, for compatibility with FLINT 3.0. o configure tests for function d_mul_2exp and src/mag.c uses d_mul_2exp _conditionally_, for compatibility with FLINT 3.0. o configure works around broken flint.pc installed by FLINT 3.0. o configure uses simpler prerequisite code when testing whether system header flint/flint.h can be compiled. o src/noreturn.h is much refined, for compatibility with FLINT 3.0. The original version triggered clang -Wunknown-attributes. o src/revertnoreturn.h is included after the FLINT headers so that definitions in src/noreturn.h do not infect headers included later. Changes in version 0.0.2 (2025-02-20) Installation o 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. o 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. o configure wrongly assumed that Rinternals.h must be located in `R RHOME`/include. Thanks to Dirk Eddelbuettel for the report (GH#3). o More pointers are zero-initialized to appease clang -Wsometimes-uninitialized. Changes in version 0.0.1 (2025-02-17) Description o The package is titled “Fast Library for Number Theory”, matching FLINT. o Mikael Jagan is the maintainer and sole author. o Depends: R (>= 4.3) mainly for KaTeX support when rendering Rd to HTML and amsmath support when rendering Rd to PDF. o Depends: methods as flint defines S4 classes, generic functions, and methods. o Imports: stats as flint provides S3 and S4 methods for quantile. o 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. Installation o 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. o A configure.win script is provided for installation under Windows. Currently, it invokes configure, passing along positional parameters, and does nothing else. Documentation o 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. Classes o 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. o ulong and slong represent vectors of fixed precision unsigned and signed integers. The integer size is 32 or 64 bits (depending on the ABI). o fmpz represents vectors of arbitrary precision signed integers. o fmpq represents vectors of arbitrary precision rational numbers, always in “canonical” form with numerator and positive, coprime denominator o mag represents vectors of fixed precision error bounds. o arf and acf represent vectors of arbitrary precision floating-point real and complex numbers. o arb and acb represent vectors of arbitrary precision floating-point real and complex numbers _with error bounds_. They support “ball arithmetic”. Generic Functions o S4 generic functions Num, Num<-, Den, and Den<- for getting and setting numerators and denominators of quotients. o S4 generic functions Mid, Mid<-, Rad, and Rad<- for getting and setting midpoints and radii of balls in a metric space. o S4 generic functions Real, Real<-, Imag, and Imag<- for getting and setting real and imaginary parts of complex numbers. Methods o S4 methods are defined for generic (or made-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, c, 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. o 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. New Features o Generator functions for each of the nonvirtual subclasses of virtual class flint. o 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. o 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. o 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. o 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. o R functions flintPrec and flintRnd for getting and setting the global default precision and rounding mode. o R function flintSize for calculating the number of bytes used by a flint vector. o 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. o 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. o R function c.flint, the workhorse of the S4 method for c. It is exported to enable users to bypass the internal dispatch mechanism of c, which dispatches on only the first positional argument.