This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
Re: inexact->exact
- From: Jim White <jim at pagesmiths dot com>
- To: kawa at sources dot redhat dot com
- Date: Fri, 08 Nov 2002 03:14:05 -0800
- Subject: Re: inexact->exact
- References: <3DCB8471.6A1C6172@st.com>
Marco Vezzoli wrote:
> I tried the sci function posted on c.l.s whith some tests (code and
> testsuite below); function runs fine for non zero values.
> ...
> call to log (0.0)
> return from log => #i-1/0
That is the correct result. The logarithm of zero is not a number. And
the conversion of an undefined result to an exact number is also not
defined, and in the case of Kawa an exception is thrown which is acceptable.
The sci function needs to check for zero rather than assuming it can do
computations with the result of (log 0).
Jim