Subject: Re: math functions not working in scheme48 ???
From: rpw3@rigden.engr.sgi.com (Rob Warnock)
Date: 1999/05/14
Newsgroups: comp.lang.scheme
Message-ID: <7hgl1a$aafe3@fido.engr.sgi.com>
Christopher B. Browne <cbbrowne@hex.net> wrote:
+---------------
| > (sqrt 4)
| 2
| 
| Guile and scm both return 2.0; mzscheme returns 2.  Interesting.
+---------------

The latter isn't just special-casing fixnums, either.
Both MzScheme and Gambit-C return exact square roots
for bignums (only when the result *is* exact, of course):

> (define foo (apply * (map expt '(2 3 5) '(58 54 50))))
> foo
1488633267277825528073988326400000000000000000000000000000000000000000000000000
> (sqrt foo)
1220095597597920000000000000000000000000
> 


-Rob

-----
Rob Warnock, 8L-855		rpw3@sgi.com
Applied Networking		http://reality.sgi.com/rpw3/
Silicon Graphics, Inc.		Phone: 650-933-1673
1600 Amphitheatre Pkwy.		FAX: 650-933-0511
Mountain View, CA  94043	PP-ASEL-IA