Created
April 5, 2018 12:01
-
-
Save ivand58/bf7ccce49ea1cfe1e564559076084d5d to your computer and use it in GitHub Desktop.
print fixed point, two digs after dec point
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\ print fixed point, two digs after dec point | |
: f.2 ( df -- ) | |
0,005 d+ \ rounding | |
0 <# #s 2drop \ whole part | |
[char] . hold< \ decimal separator | |
f# f# \ frac part | |
0 #> \ finish | |
type space \ print | |
; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment