issue 7006 - std.math.pow (integral, integral) crashes on negative exponents

Timon Gehr timon.gehr at gmx.ch
Tue Dec 17 20:35:33 UTC 2019


On Tuesday, 17 December 2019 at 19:12:00 UTC, Ola Fosheim Grøstad 
wrote:
> On Tuesday, 17 December 2019 at 18:41:01 UTC, Ola Fosheim 
> Grøstad wrote:
>> On Tuesday, 17 December 2019 at 17:31:41 UTC, Timon Gehr wrote:
>>> Haha. pow(0.0,0.0) is either 1.0 or NaN, but pow(1.0,∞) is 
>>> guaranteed to be 1.0.
>
> Besides, that is not what it said on the page.

Yes, this is precisely what is says on the page. It may not be 
what you read, and that is because you cut corners and didn't 
read the entire page. I take a lot of care to validate my own 
statements. Please do the same.

> It said that 0^0 may lead to a domain error. [...]

"If a domain error occurs, an implementation-defined value is 
returned (NaN where supported)"


More information about the Digitalmars-d mailing list