NAME

src/pmc/bigint.pmc - BigInt PMC class

DESCRIPTION

BigInt provides arbitrary precision integer mathematic functions.

Functions

static void bigint_set_long(Interp*, PMC *, long value)
static void bigint_set_double(Interp*, PMC *, double value)

Methods

METHOD version()
Return GMP version string "x.y.z".
void set_integer_native(INTVAL value)
void set_number_native(FLOATVAL value)
Sets the value of the bigint to value.
void set_string_native(STRING *value)
Sets the value of the integer to the result of converting *value to a number.
void set_string_keyed_int(INTVAL base, STRING *value)
Same assume number base base.
void set_pmc(PMC *value)
Sets the value of the integer to the integer value of *value.
FLOATVAL get_number()
Returns the value of the integer as a floating point number.
INTVAL get_integer()
Returns the value of the integer.
INTVAL get_bool()
Returns the boolean value of the integer.
STRING *get_string()
Returns the string representation of the integer.
STRING *get_string_keyed_int(INTVAL base)
Returns the string representation of the integer in base base.
STRING *get_repr()
Returns the string representation of the integer with the letter 'L' appended.
void increment()
Increments the integer.
void decrement()
Decrements the integer.
PMC *absolute(PMC *dest)
void i_absolute()
Sets dest to the absolute value of SELF.
PMC *neg(PMC *dest)
void i_neg()
Set dest to the negated value of SELF.