[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] Possible numbers bug
From: |
Peter Bex |
Subject: |
Re: [Chicken-users] Possible numbers bug |
Date: |
Sat, 28 May 2011 20:11:28 +0200 |
User-agent: |
Mutt/1.4.2.3i |
On Sat, May 28, 2011 at 11:03:41AM -0700, Matt Welland wrote:
> What was the final word on this? Is it a real issue on some platforms?
Probably. I will look into it when time allows.
> Anyhow, I found this whole exercise pretty interesting and played with
> it a bit more and observed a couple curious things:
>
> 2. Taking the inverse exponent (i.e. result^(1/n) ) runs into trouble
> at n=144. Anyone care to explain why that is and is there a numerical
> methods trick to work around it?
You divide the inexact 1.0 by the number. Try doing an exact division
like (/ 1 n) or just (/ n). This will produce a rational number which
is exact and not limited in any way.
> 3. Why do guile, scm and STk put out +inf.0 and chicken puts out +inf
> (gauche gives #i1/0)? My hazy understanding is that +inf.0 is not the
> same as +inf.
I think it's the same. Only flonums can be +inf and hence the .0 is
superfluous.
Cheers,
Peter
--
http://sjamaan.ath.cx
--
"The process of preparing programs for a digital computer
is especially attractive, not only because it can be economically
and scientifically rewarding, but also because it can be an aesthetic
experience much like composing poetry or music."
-- Donald Knuth
- Re: [Chicken-users] Possible numbers bug, (continued)
- Re: [Chicken-users] Possible numbers bug, Christian Kellermann, 2011/05/27
- Re: [Chicken-users] Possible numbers bug, John Cowan, 2011/05/27
- Re: [Chicken-users] Possible numbers bug, Panos Stergiotis, 2011/05/27
- Re: [Chicken-users] Possible numbers bug, Kon Lovett, 2011/05/27
- Re: [Chicken-users] Possible numbers bug, Matt Welland, 2011/05/27
- Re: [Chicken-users] Possible numbers bug, Kon Lovett, 2011/05/27
- Re: [Chicken-users] Possible numbers bug, David N Murray, 2011/05/27
- Re: [Chicken-users] Possible numbers bug, Matt Welland, 2011/05/28
- Re: [Chicken-users] Possible numbers bug,
Peter Bex <=
- Re: [Chicken-users] Possible numbers bug, Matt Welland, 2011/05/28
- Re: [Chicken-users] Non-finite number I/O (was: Possible numbers bug), John Cowan, 2011/05/28
- Re: [Chicken-users] Possible numbers bug, Felix, 2011/05/30
Re: [Chicken-users] Possible numbers bug, Peter Bex, 2011/05/29