- :floating
round
round given value
Parameters
round value :integer :floating :rational
Attributes
to | :integer | round to given decimal places |
Returns
Examples
copyprint round 2.1 ; 2.0 print round 2.9 ; 3.0 print round 6 ; 6.0 print round to :rational [29 10] ; 3.0 print round to :rational [21 10] ; 2.0 print round to :rational [5 2] ; 3.0 print round pi ; 3.0
copyprint round.to:5 pi ; 3.14159 print round.to:2 pi ; 3.14