NAME
src/pmc/float.pmc - Floating-point number
DESCRIPTION
Float
extends scalar
to provide floating-point number operations.
Functions
void init()
Initializes the number to zero.
void destroy()
Destroy this PMC.
PMC *clone()
Make an exact copy of this PMC.
PMC *instantiate_str(STRING *rep, INTVAL flags)
Class method to construct an Integer from the string representation FLOATVAL get_number()
Returns the value of the number.
INTVAL get_integer()
Returns an integer representation of the number (by casting).
INTVAL get_bool()
Evaluates the number as a boolean,
i.e.
it's true if it's not zero.
STRING *get_string()
Returns a Parrot string representation of the number.
STRING *get_repr()
void set_integer_native(INTVAL value)
void set_bool(INTVAL value)
void set_number_native(FLOATVAL value)
Sets the value of the number to void set_number_same(PMC *value)
Sets the value of the number to the value of void set_string_native(STRING *value)
Sets the value of the number to the value of void set_pmc(PMC *value)
Sets the value of the number to the value in PMC *neg(PMC *dest)
void i_neg()
Set INTVAL is_equal(PMC *value)
The INTVAL cmp(PMC *value)
The INTVAL cmp_num(PMC *value)
Returns the result of comparing the number with void increment()
Increments the number.
void decrement()
Decrements the number.
PMC *absolute(PMC *dest)
void i_absolute()
Sets void freeze(visit_info *info)
Used to archive the number.
void thaw(visit_info *info)
Used to unarchive the number.
rep
.
value
.
*value
.
*value
.Note that this method morphs the number into a String
.
*value
.
dest
to the negated value of SELF
.
==
operation.
cmp
operation.
*value
.
dest
to the absolute value of SELF.
Methods
METHOD PMC *acos()
METHOD PMC *asec()
METHOD PMC *asin()
METHOD PMC *cos()
METHOD PMC *cosh()
METHOD PMC *exp()
METHOD PMC *ln()
METHOD PMC *log10()
METHOD PMC *log2()
METHOD PMC *sec()
METHOD PMC *sech()
METHOD PMC *sin()
METHOD PMC *sinh()
METHOD PMC *tan()
METHOD PMC *tanh()
METHOD PMC *sqrt()
Return a new PMC of the type of
SELF
with FUNC(value) of SELF.