Re: [Scheme-reports] Division by zero
John Cowan 24 Aug 2011 22:56 UTC
Peter Bex scripsit:
> Still working on numbers stuff for Chicken, I found that the division
> procedures (at least "/", maybe others) do not mention what happens
> when dividing by zero. It would be a good thing to specify whether it
> should error or not, (and also if this should happen for inexacts or
> not!)
>
> For the floor/ ... euclidian-remainder, the document mentions that n2
> *should not be* 0, but it doesn't really say what happens when it is.
> Since the standard now knows about exceptions, why not specify that an
> exception should be signaled?
Although R7RS-small provides a way of catching exceptions that
are signalled, it stands basically with R5RS as far as requiring
implementations to signal them -- that is, for the most part there is no
such requirement. Dividing by zero is a domain error, and in general,
implementations are free to do what they like with domain errors.
--
After fixing the Y2K bug in an application: John Cowan
WELCOME TO <censored> cowan@ccil.org
DATE: MONDAK, JANUARK 1, 1900 http://www.ccil.org/~cowan
_______________________________________________
Scheme-reports mailing list
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports