parrotcode: BigInt PMC class | |
Contents | PMCs |
classes/bigint.pmc - BigInt PMC class
BigInt
provides arbitray precision integer mathematic functions.
static void bigint_set_long(Interp*, PMC*, long value)
static void bigint_set_double(Interp*, PMC*, double value)
void *invoke(void *next)
long
object according to 2.1.
Built-in Functions.*/
void init () { bigint_init(INTERP, SELF); }/*
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.
BIGNUM *get_bignum()
Returns the BIGNUM.
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.
void absolute()
Sets
dest
to the absolute value of SELF.
Hey! The above document had some coding errors, which are explained below:
|