]> gitweb.factorcode.org Git - factor.git/commitdiff
math.floating-point: improve double. printing
authorJohn Benediktsson <mrjbq7@gmail.com>
Mon, 1 May 2023 16:29:36 +0000 (09:29 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Mon, 1 May 2023 16:29:36 +0000 (09:29 -0700)
basis/math/floating-point/floating-point.factor

index cf1965a24b62107d10497e44ac190ef6f1995bd0..b71322a73a4ec9e329d6b390342420d147dfb4c7 100644 (file)
@@ -31,11 +31,11 @@ IN: math.floating-point
 
 : double. ( double -- )
     double>bits
-    [ (double-sign) .b ]
+    [ (double-sign) >bin print ]
     [ (double-exponent-bits) >bin 11 CHAR: 0 pad-head bl print ]
     [
         (double-mantissa-bits) >bin 52 CHAR: 0 pad-head
-        11 [ bl ] times print
+        12 [ bl ] times print
     ] tri ;
 
 : infinity? ( double -- ? )