write a double in the digits that read back as it
CHICKEN prints 15 significant digits unless told otherwise, too few to name every double: 0.9871465422297019 reached the C as 0.987146542229702, a different constant. Found in vs-map-viewer, where 380 literals in a port that has to match .NET bit for bit changed this way. The shortest spelling that reads back is written, up to 17 digits.
This commit is contained in:
@@ -8,7 +8,8 @@
|
||||
"toplevel: 1 2.5 hi 12"
|
||||
"closure in place: 5"
|
||||
"a type is not a call: 7"
|
||||
"radix literals: 224 5 128")
|
||||
"radix literals: 224 5 128"
|
||||
"a double reaches C whole: 1")
|
||||
(return 0)
|
||||
|
||||
;;; The walk types an expression by its head, and the heads it had a
|
||||
@@ -92,4 +93,8 @@
|
||||
;; a mask reads best in the radix it is a mask in
|
||||
(var lead int 0xE5)
|
||||
(printf "radix literals: %d %d %d\n" (& lead 0xE0) (& lead 0b111) #x80)
|
||||
|
||||
;; ...and a double in all the digits it was written with
|
||||
(var sixth double (/ 1.0 6.0))
|
||||
(printf "a double reaches C whole: %d\n" (== 0.16666666666666666 sixth))
|
||||
(return 0))
|
||||
|
||||
Reference in New Issue
Block a user