* [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))
|
[(memv c '(#\e #\E))
|
||||||
(let ([ex (parse-exponent-start x n (fxadd1 i) radix)])
|
(let ([ex (parse-exponent-start x n (fxadd1 i) radix)])
|
||||||
(and ex
|
(and ex
|
||||||
(let ([ac (exact-conv (or exact? 'i) ac)])
|
(let ([ac (* (if pos? ac (- ac)) (expt radix ex))])
|
||||||
(* (if pos? ac (- ac)) (expt radix ex)))))]
|
(exact-conv (or exact? 'i) ac))))]
|
||||||
[else #f]))]))
|
[else #f]))]))
|
||||||
(define (parse-integer-no-digits x n i pos? radix exact?)
|
(define (parse-integer-no-digits x n i pos? radix exact?)
|
||||||
(cond
|
(cond
|
||||||
|
|
|
@ -596,7 +596,7 @@
|
||||||
(unless (= radix 10)
|
(unless (= radix 10)
|
||||||
(num-error "invalid decimal" (cons c ls)))
|
(num-error "invalid decimal" (cons c ls)))
|
||||||
(let ([ex (tokenize-exponent-start p (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))))]
|
(* ac (expt radix ex))))]
|
||||||
[(delimiter? c)
|
[(delimiter? c)
|
||||||
(unread-char c p)
|
(unread-char c p)
|
||||||
|
|
Loading…
Reference in New Issue