[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 a écrit :
On 2007-06-15 09:40:12 +0000, Michel Hack wrote:
Looks good.  Some comments:

- tanpi x   ]-infty,infty[ \ { 1/2 + k, k in Z}
I suppose the reason for excluding half-integers is that the sign of
Infinity would be undetermined by the limit argument.  I wonder however
whether the rule used for the sign of x-x could not be used here: +Inf
except when rounding towards -Inf.

I don't think this would be a good idea. Note that one has +0 = -0 (so
that even if the sign of the zero is incorrect, one gets a value that
is equal to the "correct" value), but one does not have +inf = -inf.
So, the zeros and the infinities should not be treated in the same way.



I agree with Vincent. A general rule that handles such cases will be much more difficult to justify.

However, if in some context you really had good reasons for that, an alternative would be that a language defines (for example) the mathematical function
tanpi x   ]-infty,infty[  such that tanpi(1/2 + k, k in Z) = +infty

It is in anticipation of such situations that our proposal considers mathematical functions as defined over the affinely extended reals with values in the affinely extended reals.

Now I don't want to open an endless discussion on the choice of which infinity, considering that tanpi is odd...

        Florent

754 | revision | FAQ | references | list archive