This is the mail archive of the kawa@sourceware.org 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: Division by zero


On 28 October 2011 01:31, John-Paul Verkamp <verkampj@umail.iu.edu> wrote:
> Mostly out of curiosity, why doesn't division by zero raise an error?
>
> #|kawa:1|# (/ 1 0)
> 1/0
>
> But div does:
>
> #|kawa:2|# (div 1 0)
> /dev/stdin:3:1: warning - call to #<procedure div> throws
> java.lang.ArithmeticException: / by zero

I think this is due to incomplete support for "exact infinities".  I
posted about a similar issue on the mailing lists, and Per explained
why he chose to handle the cases differently and what he thought was
required to implement it:

http://sourceware.org/ml/kawa/2011-q2/msg00029.html

HTH,
Charles.


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