issue 7006 - std.math.pow (integral, integral) crashes on negative exponents
Timon Gehr
timon.gehr at gmx.ch
Tue Dec 17 17:31:41 UTC 2019
On 17.12.19 18:09, Timon Gehr wrote:
> On 17.12.19 17:48, Martin Tschierschke wrote:
>> ...
>>
>> https://en.cppreference.com/w/cpp/numeric/math/pow
> ...
Haha. pow(0.0,0.0) is either 1.0 or NaN, but pow(1.0,∞) is guaranteed to
be 1.0.
So I guess the C++ standards committee considers the base a pristine
value from ℝ while the exponent is rounded floating-point garbage. I
wonder how much thought they actually put into this. I also wonder if
there are any implementations who indeed choose to deviate from the
floating-point standard. (GNU C++ evaluates pow(0.0,0.0) as 1.0).
More information about the Digitalmars-d
mailing list