pyrpn is an rpn calculator with loadable modules.
- v0.7.2.tar.gz
- decimal, using the Python Decimal module for arbitrary precision not restricted by floating-point representation. Mathematics library adapted by Ulrik Sverdrup and partly using and dmath math library. The math library can't guarantee the precision, but basic operations and the functions exp, log, sin and should hold reasonable quality
- complex, using the builtin complex type for floating-point math and complex math
- set, using a set datatype and making some set operations available, like listing the set of all subsets of a set
The module loaded is by default decimal, but it can be selected with a commandline flag: --decimal, --complex, or --set
Examples from decimal and set:
>> Using module op_decimal
>> Decimal: arbitrary precision real numbers
>> dmath: math library (C) Brian Beck, Christopher Hesse, MIT Licensed
stack:
rpn> 50 setprecision
stack:
rpn> pi
stack: 3.1415926535897932384626433832795028841971693993751
rpn> 2 / sin
stack: 1.0000000000000000000000000000000000000000000000000
>> Using module op_set
>> Set: set operations, infinite precision
stack:
rpn> 1 2 3 )
stack: (1, 2, 3)
rpn> subsets
stack: ((3,), (1, 2), (), (2, 3), (1,), (1, 3), (1, 2, 3), (2,))
pyrpn is released under GNU GPL v2 or any later version. dmath is (C) Brian Beck, Christopher Hesse, and is released under the MIT License.