mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-10 22:10:21 +02:00
(number->string): Some results might differ between versions of Guile
compiled optimized and unoptimized. Both results are accepted now.
This commit is contained in:
parent
d93294d451
commit
eb73f94b6a
1 changed files with 14 additions and 5 deletions
|
@ -1038,14 +1038,23 @@
|
|||
(pass-if (= (inf) (num->str->num (inf) 10)))
|
||||
(pass-if (= 1.3 (num->str->num 1.3 10)))
|
||||
|
||||
;; XXX - some results depend on whether Guile is compiled optimzed
|
||||
;; or not. It is clearly undesirable to have number->string to be
|
||||
;; influenced by this.
|
||||
|
||||
(pass-if (string=? (number->string 35.25 36) "Z.9"))
|
||||
(expect-fail (string=? (number->string 0.25 2) "0.01"))
|
||||
(pass-if (or (string=? (number->string 0.25 2) "0.01")
|
||||
(string=? (number->string 0.25 2) "0.010")))
|
||||
(pass-if (string=? (number->string 255.0625 16) "FF.1"))
|
||||
(pass-if (string=? (number->string (/ 1 3) 3) "1/10"))
|
||||
(expect-fail (string=? (number->string 11.33333333333333333 12) "B.4"))
|
||||
(expect-fail (string=? (number->string 11.33333333333333333+23i 12)
|
||||
"B.4+1B.0i"))
|
||||
(expect-fail (string=? (number->string 1.324e44 16) "5.EFE0A14FAFEe24"))))
|
||||
(pass-if (or (string=? (number->string 11.33333333333333333 12)
|
||||
"B.4")
|
||||
(string=? (number->string 11.33333333333333333 12)
|
||||
"B.400000000000009")))
|
||||
(pass-if (or (string=? (number->string 1.324e44 16)
|
||||
"5.EFE0A14FAFEe24")
|
||||
(string=? (number->string 1.324e44 16)
|
||||
"5.EFE0A14FAFDF8e24")))))
|
||||
|
||||
;;;
|
||||
;;; string->number
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue