mirror of
https://github.com/louisrubet/rpn
synced 2024-12-30 10:23:32 +01:00
57 lines
610 B
Text
57 lines
610 B
Text
## REAL representation
|
|
|
|
default erase
|
|
|
|
# std (1)
|
|
erase
|
|
1
|
|
10 std
|
|
-> stack should be 1
|
|
|
|
# std (2)
|
|
3 /
|
|
-> stack should be 0.3333333333
|
|
|
|
# std (3)
|
|
3 std
|
|
-> stack should be 0.333
|
|
|
|
# fix (1)
|
|
drop
|
|
10 fix
|
|
1
|
|
-> stack should be 1.0000000000
|
|
|
|
# fix (2)
|
|
4 fix
|
|
-> stack should be 1.0000
|
|
|
|
# sci (1)
|
|
12 sci
|
|
-> stack should be 1.000000000000e+00
|
|
|
|
# sci (2)
|
|
2 sci
|
|
-> stack should be 1.00e+00
|
|
drop
|
|
|
|
# prec (1)
|
|
default
|
|
2 prec pi
|
|
-> stack should be 3
|
|
drop
|
|
|
|
# prec (2)
|
|
10 prec pi
|
|
-> stack should be 3.140625
|
|
drop
|
|
|
|
# prec error (1)
|
|
1 prec
|
|
-> error should be 4
|
|
|
|
# prec error (2)
|
|
0x8000000000000000 prec
|
|
-> error should be 4
|
|
|
|
default
|