[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#18932: string->number errors on e.g. "1e400xyz"
From: |
"Taylan Ulrich Bayırlı/Kammer" |
Subject: |
bug#18932: string->number errors on e.g. "1e400xyz" |
Date: |
Mon, 03 Nov 2014 10:20:58 +0100 |
When string->number is given a number in scientific notation with a
very high exponent, it errors with "value out of range."
I don't know if that is acceptable, but what seems unacceptable is
that it errors even if the string contains further characters and is
thus not a valid number; R5RS says that #f should be returned when the
string does not contain a syntactically valid number, and R7RS adds
explicitly that string->number never signals an error due to the
contents of the given string.
Apparently MIT/GNU Scheme has the same bug, as reported by 'ecraven'
on #scheme. From other systems I tested, Racket, Gauche, Gambit, and
Chibi return +inf.0 for numbers with a too high exponent; I'm told
Chicken also does so when the "numbers egg" is loaded.
Taylan
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#18932: string->number errors on e.g. "1e400xyz",
"Taylan Ulrich Bayırlı/Kammer" <=