* [Partially] Fixes bug 162334: exact->inexact is broken for 5e-324
This commit is contained in:
parent
ef6b9c0bae
commit
3feb49e10c
|
@ -2311,8 +2311,8 @@
|
|||
[(memv c '(#\e #\E))
|
||||
(let ([ex (parse-exponent-start x n (fxadd1 i) radix)])
|
||||
(and ex
|
||||
(let ([ac (exact-conv (or exact? 'i) ac)])
|
||||
(* (if pos? ac (- ac)) (expt radix ex)))))]
|
||||
(let ([ac (* (if pos? ac (- ac)) (expt radix ex))])
|
||||
(exact-conv (or exact? 'i) ac))))]
|
||||
[else #f]))]))
|
||||
(define (parse-integer-no-digits x n i pos? radix exact?)
|
||||
(cond
|
||||
|
|
|
@ -596,7 +596,7 @@
|
|||
(unless (= radix 10)
|
||||
(num-error "invalid decimal" (cons c ls)))
|
||||
(let ([ex (tokenize-exponent-start p (cons c ls))])
|
||||
(let ([ac (convert/exact (or exact? 'i) ac)])
|
||||
(convert/exact (or exact? 'i)
|
||||
(* ac (expt radix ex))))]
|
||||
[(delimiter? c)
|
||||
(unread-char c p)
|
||||
|
|
Loading…
Reference in New Issue