[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Scheme-reports] Division by zero

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@x
        DATE: MONDAK, JANUARK 1, 1900           http://www.ccil.org/~cowan

Scheme-reports mailing list