Sophie

Sophie

distrib > Mageia > 1 > i586 > by-pkgid > d92aa75c2d384ff9f513aed09a46f703 > files > 251

parrot-doc-3.1.0-2.mga1.i586.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>Parrot  - Floating&#45;point number</title>
        <link rel="stylesheet" type="text/css"
            href="../../../resources/parrot.css"
            media="all">
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    </head>
    <body>
        <div id="wrapper">
            <div id="header">

                <a href="http://www.parrot.org">
                <img border=0 src="../../../resources/parrot_logo.png" id="logo" alt="parrot">
                </a>
            </div> <!-- "header" -->
            <div id="divider"></div>
            <div id="mainbody">
                <div id="breadcrumb">
                    <a href="../../../html/index.html">Home</a> &raquo; <a href="../../../html/pmc.html">PMCs</a> &raquo; Floating&#45;point number
                </div>

<h1><a name="NAME"
>NAME</a></h1>

<p>src/pmc/float.pmc &#45; Floating&#45;point number</p>

<h1><a name="DESCRIPTION"
>DESCRIPTION</a></h1>

<p><code>Float</code> extends <code>scalar</code> to provide floating&#45;point number operations.</p>

<h2><a name="Functions"
>Functions</a></h2>

<dl>
<dt><a name="void_init()"
><b><code>void init()</b></code></a></dt>
Initializes the number to zero.
<dt><a name="PMC_*clone()"
><b><code>PMC *clone()</b></code></a></dt>
Make an exact copy of this PMC.
<dt><a name="FLOATVAL_get_number()"
><b><code>FLOATVAL get_number()</b></code></a></dt>
Returns the value of the number.
<dt><a name="INTVAL_get_integer()"
><b><code>INTVAL get_integer()</b></code></a></dt>
Returns an integer representation of the number by truncating (rounding toward zero).
<dt><a name="INTVAL_get_bool()"
><b><code>INTVAL get_bool()</b></code></a></dt>
Evaluates the number as a boolean,
i.e.
it&#39;s true if it&#39;s not zero.
<dt><a name="STRING_*get_string()"
><b><code>STRING *get_string()</b></code></a></dt>
Returns a Parrot string representation of the number.
<dt><a name="STRING_*get_repr()"
><b><code>STRING *get_repr()</b></code></a></dt>

<dt><a name="void_set_integer_native(INTVAL_value)"
><b><code>void set_integer_native(INTVAL value)</b></code></a></dt>

<dt><a name="void_set_bool(INTVAL_value)"
><b><code>void set_bool(INTVAL value)</b></code></a></dt>

<dt><a name="void_set_number_native(FLOATVAL_value)"
><b><code>void set_number_native(FLOATVAL value)</b></code></a></dt>
Sets the value of the number to <code>value</code>.
<dt><a name="void_set_string_native(STRING_*value)"
><b><code>void set_string_native(STRING *value)</b></code></a></dt>
Sets the value of the number to the value of <code>*value</code>.Note that this method morphs the number into a <code>String</code>.
<dt><a name="void_set_pmc(PMC_*value)"
><b><code>void set_pmc(PMC *value)</b></code></a></dt>
Sets the value of the number to the value in <code>*value</code>.
<dt><a name="PMC_*neg(PMC_*dest)"
><b><code>PMC *neg(PMC *dest)</b></code></a></dt>

<dt><a name="void_i_neg()"
><b><code>void i_neg()</b></code></a></dt>
Set <code>dest</code> to the negated value of <code>SELF</code>.
<dt><a name="INTVAL_is_equal(PMC_*value)"
><b><code>INTVAL is_equal(PMC *value)</b></code></a></dt>
The <code>==</code> operation.
<dt><a name="INTVAL_cmp(PMC_*value)"
><b><code>INTVAL cmp(PMC *value)</b></code></a></dt>
The <code>cmp</code> operation.
<dt><a name="INTVAL_cmp_num(PMC_*value)"
><b><code>INTVAL cmp_num(PMC *value)</b></code></a></dt>
Returns the result of comparing the number with <code>*value</code>.
<dt><a name="void_increment()"
><b><code>void increment()</b></code></a></dt>
Increments the number.
<dt><a name="void_decrement()"
><b><code>void decrement()</b></code></a></dt>
Decrements the number.
<dt><a name="PMC_*absolute(PMC_*dest)"
><b><code>PMC *absolute(PMC *dest)</b></code></a></dt>

<dt><a name="void_i_absolute()"
><b><code>void i_absolute()</b></code></a></dt>
Sets <code>dest</code> to the absolute value of SELF.
<dt><a name="void_freeze(PMC_*info)"
><b><code>void freeze(PMC *info)</b></code></a></dt>
Used to archive the number.
<dt><a name="void_thaw(PMC_*info)"
><b><code>void thaw(PMC *info)</b></code></a></dt>
Used to unarchive the number.</dl>

<h2><a name="Methods"
>Methods</a></h2>

<dl>
<dt><a name="METHOD_PMC_*acos()"
><b><code>METHOD PMC *acos()</b></code></a></dt>

<dt><a name="METHOD_PMC_*asec()"
><b><code>METHOD PMC *asec()</b></code></a></dt>

<dt><a name="METHOD_PMC_*asin()"
><b><code>METHOD PMC *asin()</b></code></a></dt>

<dt><a name="METHOD_PMC_*cos()"
><b><code>METHOD PMC *cos()</b></code></a></dt>

<dt><a name="METHOD_PMC_*cosh()"
><b><code>METHOD PMC *cosh()</b></code></a></dt>

<dt><a name="METHOD_PMC_*cot()"
><b><code>METHOD PMC *cot()</b></code></a></dt>

<dt><a name="METHOD_PMC_*csc()"
><b><code>METHOD PMC *csc()</b></code></a></dt>

<dt><a name="METHOD_PMC_*exp()"
><b><code>METHOD PMC *exp()</b></code></a></dt>

<dt><a name="METHOD_PMC_*ln()"
><b><code>METHOD PMC *ln()</b></code></a></dt>

<dt><a name="METHOD_PMC_*log10()"
><b><code>METHOD PMC *log10()</b></code></a></dt>

<dt><a name="METHOD_PMC_*log2()"
><b><code>METHOD PMC *log2()</b></code></a></dt>

<dt><a name="METHOD_PMC_*sec()"
><b><code>METHOD PMC *sec()</b></code></a></dt>

<dt><a name="METHOD_PMC_*sech()"
><b><code>METHOD PMC *sech()</b></code></a></dt>

<dt><a name="METHOD_PMC_*sin()"
><b><code>METHOD PMC *sin()</b></code></a></dt>

<dt><a name="METHOD_PMC_*sinh()"
><b><code>METHOD PMC *sinh()</b></code></a></dt>

<dt><a name="METHOD_PMC_*tan()"
><b><code>METHOD PMC *tan()</b></code></a></dt>

<dt><a name="METHOD_PMC_*tanh()"
><b><code>METHOD PMC *tanh()</b></code></a></dt>

<dt><a name="METHOD_PMC_*sqrt()"
><b><code>METHOD PMC *sqrt()</b></code></a></dt>
Return a new PMC of the type of <code>SELF</code> with <i>FUNC</i>(value) of SELF.</dl>
            </div> <!-- "mainbody" -->
            <div id="divider"></div>
            <div id="footer">
	        Copyright &copy; 2002-2011, Parrot Foundation.
            </div>
        </div> <!-- "wrapper" -->
    </body>
</html>