Jerome Quelin > Language-Befunge > Language::Befunge::lib::FIXP

Download:
Language-Befunge-4.13.tar.gz

Dependencies

Annotate this POD

Website

CPAN RT

Open  0
View/Report Bugs
Source  

NAME ^

Language::Befunge::IP::lib::FIXP - fixed point operations

DESCRIPTION ^

The FIXP fingerprint (0x4649585) allows to do fixed point operations.

FUNCTIONS ^

new

Create a new FIXP instance.

Angle operations

Those functions expect their arguments times 10000, and their result follow the same convention (this gives 4 digits of precision). All angles are in degrees.

$r = B( $v )

Push back acos($v) on the stack. See precision convention above.

$r = C( $v )

Push back cos($v) on the stack. See precision convention above.

$r = I( $v )

Push back sin($v) on the stack. See precision convention above.

$r = J( $v )

Push back asin($v) on the stack. See precision convention above.

$r = T( $v )

Push back tan($v) on the stack. See precision convention above.

$r = U( $v )

Push back atan($v) on the stack. See precision convention above.

Arithmetic functions

$r = A( $a, $b )

Push back $a & $b on the stack.

$r = O( $a ,$b )

Push back $a | $b on the stack.

$r = X( $a, $b )

Push back $a xor $b on the stack.

Numeric functions

$r = D( $v )

Push back rand($v) on the stack.

$r = N( $v )

Push back 0-$a on the stack (negation of argument).

$r = P( $v )

Push back $v * pi on the stack.

$r = Q( $v )

Push back sqrt $v on the stack.

$r = R( $a, $b )

Push back $a ** $b on the stack.

$r = S( $v )

Push back the sign of $v on the stack.

$r = V( $v )

Push back abs($v) on the stack.

SEE ALSO ^

Language::Befunge, http://www.rcfunge98.com/rcsfingers.html#FIXP.

AUTHOR ^

Jerome Quelin, <jquelin@cpan.org>

COPYRIGHT & LICENSE ^

Copyright (c) 2001-2009 Jerome Quelin, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

syntax highlighting: