Sophie

Sophie

distrib > Fedora > 15 > x86_64 > by-pkgid > 1e007a96761035f261351a68e7601417 > files > 235

parrot-docs-3.6.0-2.fc15.noarch.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  - Obscure Mathematical Opcodes</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/ops.html">Opcodes</a> &raquo; Obscure Mathematical Opcodes
                </div>

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

<p>obscure.ops &#45; Obscure Mathematical Opcodes</p>

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

<p>Parrot&#39;s library of obscure mathematical ops.
These turn common trig expressions into a single op.</p>

<p>To use this library of ops,
add this directive to your PIR:</p>

<pre> .loadlib &#39;obscure_ops&#39;</pre>

<h2><a name="Obscure_trigonometric_operations"
>Obscure trigonometric operations</a></h2>

<p>Reference:</p>

<pre>    Abramowitz, M. and Stegum, C. A. (Eds.). Handbook of Mathematical
    Functions with Formulas, Graphs, and Mathematical Tables, 9th printing.
    New York: Dover, p. 78, 1972.</pre>

<dl>
<dt><a name="covers(out_NUM,_in_NUM)"
><b>covers</b>(out NUM, in NUM)</a></dt>
Set $1 to the coversine (in radians) of $2.
<dt><a name="exsec(out_NUM,_in_NUM)"
><b>exsec</b>(out NUM, in NUM)</a></dt>
Set $1 to the exsecant of $2 (given in radians).
<dt><a name="hav(out_NUM,_in_NUM)"
><b>hav</b>(out NUM, in NUM)</a></dt>
Set $1 to the haversine (in radians) of $2.
<dt><a name="vers(out_NUM,_in_NUM)"
><b>vers</b>(out NUM, in NUM)</a></dt>
Set $1 to the versine (in radians) of $2.
<dt><a name="gcd(out_INT,_in_INT,_in_INT)"
><b>gcd</b>(out INT, in INT, in INT)</a></dt>
Greatest Common divisor of $2 and $3.
<dt><a name="lcm(out_INT,_in_INT,_in_INT)"
><b>lcm</b>(out INT, in INT, in INT)</a></dt>
Least Common Multiple of $2 and $3
<dt><a name="fact(out_INT,_in_INT)"
><b>fact</b>(out INT, in INT)</a></dt>

<dt><a name="fact(out_NUM,_in_INT)"
><b>fact</b>(out NUM, in INT)</a></dt>
Factorial, n!. Calculates the product of 1 to N.</dl>

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

<p>Copyright (C) 2001&#45;2009, Parrot Foundation.</p>

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

<p>This program is free software. It is subject to the same license as the Parrot interpreter itself.</p>
            </div> <!-- "mainbody" -->
            <div id="divider"></div>
            <div id="footer">
	        Copyright &copy; 2002-2011, Parrot Foundation.
            </div>
        </div> <!-- "wrapper" -->
    </body>
</html>