diff --git a/src/ikarus.boot b/src/ikarus.boot index eedc1ca..802b07b 100644 Binary files a/src/ikarus.boot and b/src/ikarus.boot differ diff --git a/src/ikarus.numerics.ss b/src/ikarus.numerics.ss index ead6a0e..f3b01e4 100644 --- a/src/ikarus.numerics.ss +++ b/src/ikarus.numerics.ss @@ -2143,6 +2143,13 @@ (error 'string->number "~s is not a string" x)) (let ([n (string-length x)]) (cond + [(fx= n (string-length "+xxx.0")) + (cond + [(string=? x "+inf.0") +inf.0] + [(string=? x "-inf.0") -inf.0] + [(string=? x "+nan.0") +nan.0] + [(string=? x "-nan.0") -nan.0] + [else (start x n 0 #f #f)])] [(fx> n 0) (start x n 0 #f #f)] [else #f])))) diff --git a/src/ikarus.reader.ss b/src/ikarus.reader.ss index 7ed7bae..f731ca6 100644 --- a/src/ikarus.reader.ss +++ b/src/ikarus.reader.ss @@ -664,10 +664,10 @@ (tokenize-decimal-no-digits p (cons c ls) #f)] [(char=? c #\i) (read-char* p (cons #\i ls) "nf.0" "number sequence") - (/ 1.0 0.0)] + +inf.0] [(char=? c #\n) (read-char* p (cons #\i ls) "an.0" "number sequence") - (/ (/ 1.0 0.0) (/ 1.0 0.0))] + +nan.0] [else (num-error "invalid sequence" (cons c ls))]))) (define (tokenize-integer-no-digits p ls exact? radix?) (let ([c (read-char p)])