NAME

src/pmc/bigint.pmc - BigInt PMC class

DESCRIPTION

BigInt provides arbitrary precision integer mathematic functions.

Functions

static void bigint_set_long(PARROT_INTERP, PMC *self, long value)
static void bigint_set_double(PARROT_INTERP, PMC *self, double value)
static void bigint_init(PARROT_INTERP, PMC *self)
static void bigint_clear(PARROT_INTERP, PMC *self)
static void bigint_set(PARROT_INTERP, PMC *dest, PMC *src)
static void bigint_set_long(PARROT_INTERP, PMC *self, long value)
static void bigint_set_double(PARROT_INTERP, PMC *self, double value)
static void bigint_set_str(PARROT_INTERP, PMC *self, const STRING *value, int base)
static BIGINT* bigint_get_self(PARROT_INTERP, PMC *self)
static void bigint_set_self(PARROT_INTERP, PMC *self, BIGINT *value)
static long bigint_get_long(PARROT_INTERP, PMC *self)
static int bigint_get_bool(PARROT_INTERP, PMC *self)
static char * bigint_get_string(PARROT_INTERP, PMC *self, int base)
static double bigint_get_double(PARROT_INTERP, PMC *self)
static void bigint_add_bigint(PARROT_INTERP, PMC *self, PMC *value, PMC *dest)
static void bigint_add_bigint_int(PARROT_INTERP, PMC *self, INTVAL value, PMC *dest)
static void bigint_sub_bigint(PARROT_INTERP, PMC *self, PMC *value, PMC *dest)
static void bigint_sub_bigint_int(PARROT_INTERP, PMC *self, INTVAL value, PMC *dest)
static void bigint_mul_bigint(PARROT_INTERP, PMC *self, PMC *value, PMC *dest)
static void bigint_mul_bigint_int(PARROT_INTERP, PMC *self, INTVAL value, PMC *dest)
static void bigint_pow_bigint_int(PARROT_INTERP, PMC *self, INTVAL value, PMC *dest)
static void int_check_divide_zero(PARROT_INTERP, INTVAL value)
static void bigint_check_divide_zero(PARROT_INTERP, PMC *value)
static void bigint_div_bigint(PARROT_INTERP, PMC *self, PMC *value, PMC *dest)
static void bigint_div_bigint_int(PARROT_INTERP, PMC *self, INTVAL value, PMC *dest)
static void bigint_fdiv_bigint(PARROT_INTERP, PMC *self, PMC *value, PMC *dest)
static void bigint_fdiv_bigint_int(PARROT_INTERP, PMC *self, INTVAL value, PMC *dest)
static void bigint_mod_bigint(PARROT_INTERP, PMC *self, PMC *value, PMC *dest)
static void bigint_mod_bigint_int(PARROT_INTERP, PMC *self, INTVAL value, PMC *dest)
static INTVAL bigint_cmp(PARROT_INTERP, PMC *self, PMC *value)
static INTVAL bigint_cmp_int(PARROT_INTERP, PMC *self, INTVAL value)
static void bigint_abs(PARROT_INTERP, PMC *self, PMC *dest)
static void bigint_neg(PARROT_INTERP, PMC *self, PMC *dest)

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.