Class fmpz extends virtual class flint.
It represents vectors of arbitrary precision signed integers. There
is no representation for R's missing value
NA_integer_.
## The class generator function:
.fmpz(...)## Mode 1: initialize with zeros
## .fmpz(length = 0L)
##
## Mode 2: initialize with vector
## .fmpz(length = length(x), x)
The class generator function returns new("fmpz", ...).
arguments passed to methods for initialize.
.xData, namesinherited from virtual class flint.
!signature(x = "fmpz"):
equivalent to (but faster than) x == 0.
+signature(e1 = "fmpz", e2 = "missing"):
returns a copy of the argument.
-signature(e1 = "fmpz", e2 = "missing"):
returns the negation of the argument.
Complexsignature(z = "fmpz"):
mathematical functions of one argument; see
S4groupGeneric. Member functions requiring
promotion to a floating-point type may not be implemented.
Mathsignature(x = "fmpz"):
mathematical functions of one argument; see
S4groupGeneric. Member functions requiring
promotion to a floating-point type may not be implemented.
Math2signature(x = "fmpz"):
decimal rounding according to a second argument digits; see
S4groupGeneric. There are just two member
member functions: round, signif.
Opssignature(e1 = "ANY", e2 = "fmpz"):
signature(e1 = "fmpz", e2 = "ANY"):
binary arithmetic, comparison, and logical operators; see
S4groupGeneric. The “other” operand
must be atomic or inherit from virtual class
flint. The operands are recycled and
promoted as necessary.
Summarysignature(x = "fmpz"):
univariate summary statistics; see
S4groupGeneric. The return value is a
logical vector of length 1 (any, all) or an
fmpz vector of length 1 or 2 (sum, prod,
min, max, range).
anyNAsignature(x = "fmpz"):
returns FALSE, as fmpz has no representation for
NaN.
as.vectorsignature(x = "fmpz"):
returns as.vector(y, mode), where y is a double
vector containing the result of converting each element of
x to the range of double, rounding if the value is not
exactly representable in double precision. The rounding mode is
to the nearest representable number in the direction of zero,
unless the element exceeds .Machine[["double.xmax"]] in
absolute value, in which case -Inf or Inf is
introduced with a warning. Coercion to types "character",
"symbol" (synonym "name"), "pairlist",
"list", and "expression", which are not
“number-like”, is handled specially.
coercesignature(from = "ANY", to = "fmpz"):
returns .fmpz(x = from). An error is signaled if the class
or type of from is not supported by the method for
initialize.
formatsignature(x = "fmpz"):
returns a character vector suitable for printing. Optional
arguments control the output; see format-methods.
initializesignature(.Object = "fmpz", length = "numeric"):
returns .Object after setting its .xData slot. The
new slot value is an external pointer to an array of the
corresponding C type, which is newly allocated and
initialized entirely with zeros. .Object is not copied, so
all references are affected.
initializesignature(.Object = "fmpz", length = "numeric", x = "atomic|flint"):
as above, except that the new slot value points to an array
initialized with values from x truncated towards zero. An
error is signaled if elements of x are NaN,
-Inf, or Inf.
is.finitereturns a logical vector whose elements are all TRUE, as
fmpz has no representation for NaN, -Inf, and
Inf.
is.infinite, is.na, is.nansignature(x = "fmpz"):
returns a logical vector whose elements are all FALSE, as
fmpz has no representation for NaN, -Inf, and
Inf.
is.unsortedsignature(x = "fmpz"):
returns a logical indicating if x is not sorted in
nondecreasing order (increasing order if optional argument
strictly is set to TRUE).
meansignature(x = "fmpz"):
returns the arithmetic mean. An error is signaled if the argument
length is 0, because the return type is fmpq
which cannot represent the result of division by 0.
The FLINT documentation of the underlying C type: https://flintlib.org/doc/fmpz.html
Virtual class flint.
showClass("fmpz")
showMethods(classes = "fmpz")
Run the code above in your browser using DataLab