NAME ^

pmc/luanumber.pmc - Lua Number

DESCRIPTION ^

LuaNumber extends LuaAny to provide a class with the behaviour of the Lua Number type.

Overloaded Methods ^

void init()
Initializes the number to zero.
PMC *instantiate_str(STRING *rep, INTVAL flags)
Return a LuaNumber PMC created from a string (Implementation is based on instantiate_str() from Integer PMC).Allow :
    .const .LuaNumber n = "12.34"
STRING *name()
Return the string "number".
PMC *clone()
Creates and returns a clone of the scalar.
INTVAL get_integer()
Returns an integer representation of the number (by casting).
FLOATVAL get_number()
Returns the value of the number.
STRING *get_string()
Returns a Parrot string representation of the number.
void set_integer_native(INTVAL value)
void set_number_native(FLOATVAL value)
VOID set_string_native(STRING *value)
void set_pmc(PMC *value)
Sets the value of the number to the value in *value.
void increment()
Increments the number.
void decrement()
Decrements the number.
PMC *neg(PMC *dest)
void i_neg()

non-Vtable Methods ^

PMC *add(PMC *value, PMC *dest)
void i_add(PMC *value)
PMC *subtract(PMC *value, PMC *dest)
void i_subtract(PMC *value)
PMC *multiply(PMC *value, PMC *dest)
void i_multiply(PMC *value)
PMC *divide(PMC *value, PMC *dest)
void i_divide(PMC *value)
PMC *modulus(PMC *value, PMC *dest)
void i_modulus(PMC *value)
PMC *pow(PMC *value, PMC *dest)
void i_pow(PMC *value)
INTVAL is_equal(PMC *value)
INTVAL cmp(PMC *value)
PMC *concatenate(PMC *value, PMC *dest)
void i_concatenate(PMC *value)

Specific Methods ^

PMC *acosh()
PMC *asinh()
PMC *atanh()
PMC *cbrt()
PMC *copysign(PMC *y)
PMC *erf()
PMC *erfc()
PMC *exp2()
PMC *expm1()
PMC *fdim(PMC *y)
PMC *fma(PMC *y, PMC *z)
PMC *fmax(PMC *y)
PMC *fmin(PMC *y)
PMC *fpclassify()
PMC *frexp()
PMC *hypot(PMC *y)
PMC *ilogb()
PMC *isfinite()
PMC *isinf()
PMC *isnan()
PMC *isnormal()
PMC *ldexp(PMC *x, PMC *expn)
PMC *lgamma()
PMC *log1p()
PMC *log2()
PMC *logb()
PMC *modf()
PMC *nearbyint()
PMC *nextafter(PMC *y)
PMC *nexttoward(PMC *y)
PMC *rawequal(PMC *value)
PMC *remainder(PMC *y)
PMC *rint()
PMC *round()
PMC *scalbn(PMC *ex)
PMC *signbit()
PMC *tgamma()
PMC *trunc()
PMC *tonumber()


parrot