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

Re: New approach to annex D of the 754-R proposal.



Vincent Lefevre wrote:
On 2007-06-21 00:53:00 +1000, Peter Henderson wrote:
In addition to the behaviour you describe below, I would like to propose the following:

If f(x1, .. xN) diverges, but does not tend to +infinity or -infinity
.
.
.
I personally really don't like this. I assume that you would want -Inf
in roundTowardNegative and +Inf in roundTowardPositive so that interval
arithmetic can still be consistent. In particular, this would mean that
an exact result can have a value that depends on the rounding mode!!!
I wasn't thinking of proposing that. However your comment reveals a complication interval arithmetic must handle when dealing with such functions, irrespective of my proposal.

A better way of phrasing my proposal would be:
If 1/f(x) tends to zero as x tends to y, then f(y) SHALL be AN infinity. Clearly, it follows that the sign should be the same as assigned to 1/f(x) at y.

Really, there is nothing extrodinary in my proposal. It is just trying to generalise what already happens when expressions such as 1/(x-1)^n are evaluated in the obvious manner. It happens, this will always give +infty at 1 with the exception that when the rounding mode is towards -infty and n is odd, it will give -infty.
The choice of sign should follow the same principles used to choose
the sign when the limit is 0.

0 is a different case since -0 = +0.
Signed infinities and signed zeros are inextricably linked to each other. One is the mirror image of the other. The problems in assigning a sign to exact infinity are exactly the same as those of assigning a sign to zero.
.
.
.
In this case, if
the limit does not exist but limits exist for other signs of 0 and are
equal, the non-existing limit should also be considered as existing
and equal.
What does "the limit does not exist for other signs of 0" encompass.
.
.
.
Well, the main goal was to have, e.g., log(-0) = -Inf.
Good.
.
.
.
- atan2(x,y)
[-infty,infty] * [-infty,infty] \ {(0,0), (0,infty), (+/-infty,+/-infty)}
.
.
.
Finally, useful values can be assigned to the cases (+/-0,+/-0),
etc, so the domain should be [-infty,+infty]*[-infty,+infty].

I don't think so. Could you elaborate?
Professor Kahan argues for this in his paper "Branch Cuts for Complex Elementary Functions ...". As yet, I haven't read the paper in detail so am not in a position to elaborate.
.
.
.
/ principal n-th root of x if n >= 1 and if the root exists
- root(x,n) = |  1/root(x,-n)              if n <= -1
              \  undefined                 otherwise

  [0,infty] * (Z \ {0})  U  [-intfy,0[ * (Z \ 2Z)
Why is n=0 excluded.

Because it doesn't make any sense.
It was getting late when I wrote this.

Regards,
Peter Henderson

754 | revision | FAQ | references | list archive