about summary refs log tree commit diff stats
path: root/shell/print.mu
diff options
context:
space:
mode:
authorKartik Agaram <github@akkartik.com>2021-06-17 21:27:05 -0700
committerGitHub <noreply@github.com>2021-06-17 21:27:05 -0700
commitee429152820724f3bf33de94ae14c02f71152a09 (patch)
tree43f218542791a44192433b58b46cacebf67ea4af /shell/print.mu
parentdd60caa3f51c5117c0193f8f3272e1c7f5230eb7 (diff)
parentbad113ebc093769c85452f5566935b906210e74c (diff)
downloadmu-ee429152820724f3bf33de94ae14c02f71152a09.tar.gz
Merge pull request #47 from akkartik/fix-precision
Fix precision
Diffstat (limited to 'shell/print.mu')
-rw-r--r--shell/print.mu4
1 files changed, 2 insertions, 2 deletions
diff --git a/shell/print.mu b/shell/print.mu
index ef599dc7..ea5db3cf 100644
--- a/shell/print.mu
+++ b/shell/print.mu
@@ -217,7 +217,7 @@ fn print-number _in: (addr cell), out: (addr stream byte), trace: (addr trace) {
   }
   var in/esi: (addr cell) <- copy _in
   var val/eax: (addr float) <- get in, number-data
-  write-float-decimal-approximate out, *val, 3/precision
+  write-float-decimal-approximate out, *val, 0x10/precision
   # trace
   {
     var should-trace?/eax: boolean <- should-trace? trace
@@ -228,7 +228,7 @@ fn print-number _in: (addr cell), out: (addr stream byte), trace: (addr trace) {
   var stream-storage: (stream byte 0x40)
   var stream/ecx: (addr stream byte) <- address stream-storage
   write stream, "=> number "
-  write-float-decimal-approximate stream, *val, 3/precision
+  write-float-decimal-approximate stream, *val, 0x10/precision
   trace trace, "print", stream
 }