The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Language::Befunge::IP::lib::CPLI - Complex numbers extension

DESCRIPTION

The CPLI fingerprint (0x43504C49) allows to do complex numbers operations.

FUNCTIONS

new

Create a new CPLI instance.

Complex operations

  • ($r, $i) = A( $ar, $ai, $br, $bi )

    Push ($ar+i*$ai) + ($br+i*$bi) back onto the stack (complex addition)

  • ($r, $i) = D( $ar, $ai, $br, $bi )

    Push ($ar+i*$ai) + ($br+i*$bi) back onto the stack (complex division)

  • ($r, $i) = M( $ar, $ai, $br, $bi )

    Push ($ar+i*$ai) + ($br+i*$bi) back onto the stack (complex multiplication)

  • ($r, $i) = S( $ar, $ai, $br, $bi )

    Push ($ar+i*$ai) + ($br+i*$bi) back onto the stack (complex subtraction)

  • V( $r, $i )

    Push back absolute value of complex $r + i* $i.

Output

  • O( $r, $i )

    Output complex number $r + i * $i.

SEE ALSO

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

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.