From: Stephen Adams Date: Thu, 10 Jul 1997 09:25:06 +0000 (+0000) Subject: Bug fixes: X-Git-Tag: 20090517-FFI~5073 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=b1acd1ac40d83305d0fbebba3a96e4508c9f26fd;p=mit-scheme.git Bug fixes: . "1/" returns #F instead of signalling divide by zero. . "1.2345e-306" and "1e-400" with FLONUM-PARSER-FAST? true no longer signal arithmetic errors. . STRING->NUMBER and SUBSTRING->NUMBER now check their arguments Other changes: FINISH-REAL now exploits the fact that some integers have exact floating point representations and so flonum arithmetic can be used to compute the correct result. Note that to maintain correctness, i*10^-e must be calculated as i/10^e. The results are a modest improvement on free-formatted random flonums (typically 16 digit) in the range 1e-7 to 1e35: Times for 10000 flonums generated by (random range) range 1e-100 1e-10 1e-5 1. 1e5 1e10 1e35 1e40 old 10180 8200 8210 7490 5610 3970 3990 4030 new 10280 8350 4690 4390 3930 3230 3180 4170 With FLONUM-PARSER-FAST? true, using the division trick gives better error rates over a larger range. Number of errors in 10000 random flonums range 1e-20 1e-10 1e-6 1. 1e10 1e20 1e35 1e40 old 3573 2400 3309 2798 3025 685 722 2730 new 2594 2778 1907 1010 761 685 772 2730 --- diff --git a/v8/src/runtime/make.scm b/v8/src/runtime/make.scm index aba329314..defa854b7 100644 --- a/v8/src/runtime/make.scm +++ b/v8/src/runtime/make.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: make.scm,v 14.62 1997/06/24 05:34:09 cph Exp $ +$Id: make.scm,v 14.63 1997/07/10 09:25:06 adams Exp $ Copyright (c) 1988-97 Massachusetts Institute of Technology @@ -473,6 +473,7 @@ MIT in each case. |# (RUNTIME WORKING-DIRECTORY) (RUNTIME LOAD) ;; Syntax + (RUNTIME NUMBER-PARSER) (RUNTIME PARSER) (RUNTIME UNPARSER) (RUNTIME SYNTAXER)