__builtin_cpow((0,0),(0,0))
Robert Dewar
dewar@adacore.com
Tue Mar 8 00:15:00 GMT 2005
Marcin Dalecki wrote:
>
> On 2005-03-07, at 17:16, Chris Jefferson wrote:
>
>>
>> | Mathematically speaking zero^zero is undefined, so it should be NaN.
>> | This already clear for real numbers: consider x^0 where x decreases
>> | to zero. This is always 1, so you could deduce that 0^0 should be 1.
>> | However, consider 0^x where x decreases to zero. This is always 0, so
>> | you could deduce that 0^0 should be 0. In fact the limit of x^y
>> | where x and y decrease to 0 does not exist, even if you exclude the
>> | degenerate cases where x=0 or y=0. This is why there is no reasonable
>> | mathematical value for 0^0.
>> |
>>
>> That is true.
>
>
> It's not true because it's neither true nor false. It's a not well
> formulated statement. (Mathematically).
I disagree with this, we certainly agree that 0.0 ** negative value
is undefined, i.e. that this is outside the domain of the ** function,
and I think normally in mathematics one would say the same thing,
and simply say that 0**0 is outside the domain of the function.
However, we indeed extend domains for convenience. After all
typically on computers 1.0/0.0 yielding infinity, and that
certainly does not correspond to the behavior of the division
operator over the reals in mathematics, but it is convenient :-)
More information about the Libstdc++
mailing list