NAME
src/pmc/float.pmc - Float PMC
DESCRIPTION
Float PMC extends the abstract Scalar PMC to provide floating-point number operations.
Functions
void init()
Initializes the number to zero.
PMC *clone()
Make an exact copy of this PMC.
void *get_pointer()
Return the memory address of an Float PMC.
This is needed for certain NCI applications and may be disabled in certain security contexts.
FLOATVAL get_number()
Returns the value of the number.
INTVAL get_integer()
Returns an integer representation of the number by truncating (rounding toward zero).
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_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(PMC *info)
Used to archive the number.
void thaw(PMC *info)
Used to unarchive the number.
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()
Calculate and return the inverse cosine (a.k.a METHOD PMC *acot()
Calculate and return the inverse cotangent (a.k.a.
METHOD PMC *asec()
Calculate and return the inverse secant (a.k.a.
METHOD PMC *asin()
Calculate and return the inverse sine (a.k.a.
METHOD PMC *atan()
Calculate and return the inverse tangent (a.k.a.
METHOD PMC *atan2()
Calculate and return the two argument inverse tangent (a.k.a.
METHOD PMC *cos()
Calculate and return the cosine of the input argument.
METHOD PMC *cosh()
Calculate and return the hyperbolic cosine of the input argument.
METHOD PMC *cot()
Calculate and return the cotangent of the input argument.
METHOD PMC *coth()
Calculate and return the hyperbolic cotangent of the input argument.
METHOD PMC *csc()
Calculate and return the cosecant of the input argument.
METHOD PMC *exp()
Calculate and return the exponential of the input argument.
METHOD PMC *ln()
Calculate and return the natural log (logarithm with base METHOD PMC *log10()
Calculate and return the base 10 logarithm of the input argument.
METHOD PMC *log2()
Calculate and return the base 2 logarithm of the input argument.
METHOD PMC *sec()
Calculate and return the secant of the input argument.
METHOD PMC *sech()
Calculate and return the hyperbolic secant of the input argument.
METHOD PMC *sin()
Calculate and return the sine of the input argument.
METHOD PMC *sinh()
Calculate and return the hyperbolic sine of the input argument.
METHOD PMC *tan()
Calculate and return the tangent of the input argument.
METHOD PMC *tanh()
Calculate and return the hyperbolic tangent of the input argument.
METHOD PMC *sqrt()
Calculate and return the square root of the input argument.
arccos) of the input argument.
arccot) of the input argument.
arcsec) of the input argument.
arcsin) of the input argument.
arctan) of the input argument.
arctan) of the input argument.
e) of the input argument.