NAME ^

classes/bigint.pmc - BigInt PMC class

DESCRIPTION ^

BigInt provides arbitray precision integer mathematic functions.

Functions ^

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

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

Methods ^

PMC *instantiate()

Object constructor. SELF is a BigInt Class object. Return a new BigInt object.

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.

void neg(PMC *dest)

Set dest to the negated value of SELF.


parrot