This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: inexact->exact


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]