mirror of
https://github.com/louisrubet/rpn
synced 2025-01-17 06:12:09 +01:00
#101: tested round
This commit is contained in:
parent
05c2da066e
commit
9ba011ddf4
1 changed files with 30 additions and 0 deletions
|
@ -70,6 +70,36 @@ drop
|
|||
-> error should be 4
|
||||
erase default
|
||||
|
||||
# round (1)
|
||||
"nearest" round
|
||||
-> error should be 0
|
||||
erase
|
||||
|
||||
# round (2)
|
||||
"toward zero" round
|
||||
-> error should be 0
|
||||
erase
|
||||
|
||||
# round (3)
|
||||
"toward +inf" round
|
||||
-> error should be 0
|
||||
erase
|
||||
|
||||
# round (4)
|
||||
"toward -inf" round
|
||||
-> error should be 0
|
||||
erase
|
||||
|
||||
# round (5)
|
||||
"away from zero" round
|
||||
-> error should be 0
|
||||
erase
|
||||
|
||||
# round (6)
|
||||
round
|
||||
-> error should be 2
|
||||
erase default
|
||||
|
||||
# add (1)
|
||||
1.2 2.3 +
|
||||
-> stack should be 3.5
|
||||
|
|
Loading…
Reference in a new issue