NAME

obscure.ops - Obscure Mathematical Opcodes

DESCRIPTION

Parrot's library of obscure mathematical ops. These turn common trig expressions into a single op.

To use this library of ops, add this directive to your PIR:

 .loadlib 'obscure_ops'

Obscure trigonometric operations

Reference:

    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.
covers(out NUM, in NUM)
Set $1 to the coversine (in radians) of $2.
exsec(out NUM, in NUM)
Set $1 to the exsecant of $2 (given in radians).
hav(out NUM, in NUM)
Set $1 to the haversine (in radians) of $2.
vers(out NUM, in NUM)
Set $1 to the versine (in radians) of $2.
gcd(out INT, in INT, in INT)
Greatest Common divisor of $2 and $3.
lcm(out INT, in INT, in INT)
Least Common Multiple of $2 and $3
fact(out INT, in INT)
fact(out NUM, in INT)
Factorial, n!. Calculates the product of 1 to N.

COPYRIGHT

Copyright (C) 2001-2009, Parrot Foundation.

LICENSE

This program is free software. It is subject to the same license as the Parrot interpreter itself.