Re: Nitpick with FLOOR etc.
Paul Schlie 03 Aug 2005 01:48 UTC
> From: Aubrey Jaffer <xxxxxx@alum.mit.edu>
> | > From: Aubrey Jaffer <xxxxxx@alum.mit.edu>
> | > Inverting +/0. or -/0. returns 0.0. So the name "error object"
> | > wouldn't seem to apply either.
> |
> | - I still don't understand how it's acceptable for (/ 1/-0.0) => 0.0, as
> | it seems neither necessary, nor desirable to propagate IEEE-754 mistake.
>
> (limit / -/0. -1.0e222) ==> 0.0
- which is only the case as you don't differentiate between -0.0 and +0.0;
therefore all reciprocal infinities collapse to 0.0, and hence loose their
respective originating reciprocal signs. (which I won't debate any longer
although I feel it's a mistake).
> The limit, as x approaches -/0. from -1e222, of (/ x) is 0.0.
>
> | > | This brings up an important distinction in "infinities;"
> | > | When you divide by exact zero you get an absolute infinity.
> | > | (which, perversely, is neither positive nor negative, because
> | > | exact zero isn't positive or negative.) Call this EO1.
> | >
> | > We have already covered this ground. Division by zero is undefined;
> | > SRFI-70 extends division by returning infinities in these cases:
> | > (/ -5. 0) ==> -/0.; (/ 1. 0) ==> +/0., which are consistent with
> | > the one-sided limits:
> | >
> | > (limit / 0 1.0e-9) ==> +/0.
> | > (limit / 0 -1.0e-9) ==> -/0.
> |
> | - however as multiplication by 0 should result in 0, 0/x => 0
> | regardless of its denominator.
>
> There is no multiplication by 0 here; (limit / 0 1.0e-9) is the limit,
> as x approaches 0 from 1e-9, of (/ x).
- sorry, clipped what I meant to refer to:
| 0/0. is an error object (SRFI-70 calls it an error waiting to happen),
| but +/0. and -/0. behave differently from error objects when inverted:
| (/ +/0.) ==> 0.0; and in numerical comparisons.