inexact->exact

Jim White jim@pagesmiths.com
Fri Dec 20 10:36:00 GMT 2002


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




More information about the Kawa mailing list