NAME ^

classes/pyfloat.pmc - Python Floating-Point Number

DESCRIPTION ^

These are the vtable functions for the PyFloat base class

Methods ^

PMC* "__new__"(PMC *class, PMC *source)

Create a new floating point number

INTVAL get_integer()

Returns an integer representation of the number (by casting).

PMC *get_class()

Return the class of this object.

STRING *get_repr()

Returns the number as a Parrot string.

STRING *get_string()

Returns the number as a Parrot string.

FLOATVAL get_number()

Returns the value of the number.

INTVAL hash(size_t seed)

Returns a unique hash for this value

void set_number_native(FLOATVAL value)

Sets the value of the number to value.

void set_string_native(STRING *value)

Sets the value of the number by converting *value to a number.


parrot