class gmp.Float
Description
Provides a bignum floating point class. See gmp’s mpf_class for the C++ API that is wrapped.
Includes
Methods
Instance methods
-
ceil #
gmp.Float#ceil() ⇒ gmp.FloatReturns the smallest integral value not less than
this. -
fitsInt #
gmp.Float#fitsInt() ⇒ BooleanChecks if the value fits into an integer.
-
floor #
gmp.Float#floor() ⇒ gmp.FloatReturns the largest integral value not greater than
this. -
getInt #
gmp.Float#getInt() ⇒ IntegerReturns the value as an integer.
-
get_prec #
gmp.Float#get_prec() ⇒ IntegerReturn the current precision of
this, in number of bits. -
set_prec #
gmp.Float#set_prec(prec) ⇒ undefined-
prec(Integer) – desired minimum precision.
Set the precision of
thisto be at leastprecbits. The value will be truncated to the new precision. -
-
sqrt #
gmp.Float#sqrt() ⇒ gmp.FloatReturns the square root of
this. -
trunc #
gmp.Float#trunc() ⇒ gmp.FloatReturn the integral value nearest to but not larger in magnitude then
this.