the pow() function doesn't obey the "Principle of least surprise"

Vincent Lefevre vincent@vinc17.net
Tue May 13 15:37:50 GMT 2025


On 2025-05-13 15:27:51 +0000, ROBERT NELSON wrote:
> It is well documented that pow(a,b) returns Nan if a 9s negative and
> b is real.

No, this is not how pow() is specified. It seems that you want powr().

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Pascaline project (LIP, ENS-Lyon)


More information about the Libc-alpha mailing list