Xref: utzoo comp.lang.scheme:1827 comp.lang.lisp:4031 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!rpi!dali.cs.montana.edu!ogicse!pdxgate!parsely!percy!data!kend From: kend@data.UUCP (Ken Dickey) Newsgroups: comp.lang.scheme,comp.lang.lisp Subject: Numerical gotcha's Keywords: Interval Arithmetic, Rationals, Floats, Bignums Message-ID: <432@data.UUCP> Date: 26 Nov 90 23:59:43 GMT Organization: Microcosm, Beaverton, OR Lines: 67 Thanks to all who responded to my call for numerical results. They came in pretty much as expected. Implementations without rationals (even with bignums) lost. This includes all those based on C. All implementations with rationals apparently also have bignums (not much of a suprise). CL (Common Lisp) implementations are required to have both rationals and bignums. Barry Margolin's Symbolics numbers were especially interesting! It seems that not many numerical analysts are into interval arithmetic. I have not yet heard of a reals implementation based on rationals, despite the advantage of getting error bounds. I have heard that Ray Moore's group at Ohio is getting super-linear performance with some convergence algorithms using interval arithmetic [3+ times speedup upon doubling the number of processors]. Gosh, computers are fun! [I do all my floats on Halloween to frighten the adults 8^]. Thanks again, -Ken kend@data.uucp Implementation result system ============== ====== ====== Scheme->C -1.180591620717411e+21 Sun4/110 SunOS 4.03 C-Scheme 7.0 1.18059162071741e+21 XScheme 1.18059162071741e+21 ELK 1.1 1.18059162071741e+21 Sun3 ELK 1.2 1.18059162071741e+21 SPARCstation 1 MacScheme 2.0 -1.805916207174113e21 T 3.0 approx -1.1806e21 (w reals instead of rationals) Encore Multimax Chez Scheme -54767/66192 SPARC Chez Scheme 3.9g -54767/66192 SPARCstation 1+ SunOS 4.0.3 AllegroCL 3.1.12 -54767/66192 DEC 3100/Ultrix Mac Allegro CL -54767/66192 Mac IIci T -54767/66192 SPARCstation 1 T 3.0 -54767/66192 Encore Multimax T 3.1 -54767/66192 Sun3 SunOS 4.1 Lucid CL -54767/66192 SPARCstation 1 Lucid CL -54767/66192 HP 9000/835 Utah CL -54767/66192 HP 300 BSD 4.3 ================== Here are various results on a Symbolics 3600 running Genera 8.0. The "d" is the double-precision exponent indicator, and "e" is the single-precision exponent indicator. (f 77617d0 33096d0) -1.1805916207174113d21 (f 77617e0 33096e0) 6.338253e29 (f 77617 33096) -54767/66192 (f 77617 33096e0) 6.338253e29 (f 77617e0 33096) -6.338253e29 (f 77617d0 33096) -2.3611832414348226d21 (f 77617d0 33096e0) 1.022335026998684d30 (f 77617e0 33096d0) -2.0895373854550075d29 =================== Gambit 1.5: (digits from Marc Feeley) (floor (* (tryit) (expt 10 100))) -> -8273960599468213681411650954798162919990331157843848199178148416727096930142615421803239062122310854 ;; --- E O F ---