[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: IEEE floating point support for guile?
From: |
Jim Blandy |
Subject: |
Re: IEEE floating point support for guile? |
Date: |
03 Nov 2000 17:46:04 -0500 |
"John W. Eaton" <address@hidden> writes:
> On 3-Nov-2000, Jim Blandy <address@hidden> wrote:
>
> |
> | > The current CVS guile does not seem to support IEEE floating point
> | > arithmetic. Has this topic been discussed before? Is there any
> | > interest in adding support for this to guile?
> |
> | Yes, there is interest. What changes would be necessary?
>
> Things like (/ 1 0) or (* 1e200 1e200) should produce Inf, (/ 0 0)
> should produce NaNs, these sorts of operations should be (optionally)
> raise exceptions, we should be able to test for Inf (isinf x) and NaN
> (isnan x), etc. (though maybe the spelling of isinf and isnan should
> be inf? and nan?). Control over what exceptions are raised is system
> dependent, but that's what configure is for. Octave has some tests
> for simple things like isinf and isnan, and the GSL provides some code
> for controlling exceptions.
Okay. This all sounds good. Have you looked over R5RS's section on
numerical behavior? We want to be compatible with that; I don't know
whether it conflicts with IEEE.
> Recently, there was a discussion on comp.lang.python about similar
> changes for Python. There may be some ideas there, but the discussion
> soon mutated into a discussion of whether (/ 1 2) should produce 0 or
> 0.5. BTW, I prefer 0.5 (or 1/2), but is there a way in guile to perform
> integer division?
The QUOTIENT procedure is required in R5RS.
- IEEE floating point support for guile?, John W. Eaton, 2000/11/03
- Re: IEEE floating point support for guile?, Jim Blandy, 2000/11/03
- Re: IEEE floating point support for guile?, John W. Eaton, 2000/11/03
- IEEE floating point support for guile?, Chris Hanson, 2000/11/03
- Re: IEEE floating point support for guile?, Jim Blandy, 2000/11/08
- Re: IEEE floating point support for guile?, John W. Eaton, 2000/11/08
- Re: IEEE floating point support for guile?, Jim Blandy, 2000/11/09
- Re: IEEE floating point support for guile?, Mikael Djurfeldt, 2000/11/09
- IEEE floating point support for guile?, Chris Hanson, 2000/11/09
- Re: IEEE floating point support for guile?, Mikael Djurfeldt, 2000/11/09
- Re: IEEE floating point support for guile?, Mikael Djurfeldt, 2000/11/09
- IEEE floating point support for guile?, Chris Hanson, 2000/11/09