LibM: Implement path for negative powers

This commit is contained in:
Hendiadyoin1 2021-05-11 18:36:59 +02:00 committed by Andreas Kling
parent 71fc7ac7ac
commit c74d7adac6
Notes: sideshowbarker 2024-07-18 11:06:39 +09:00

View file

@ -426,6 +426,10 @@ long double powl(long double x, long double y) NOEXCEPT
result = 1.0l / result;
return result;
}
if (x < 0) {
return 1.l / exp2l(y * log2l(-x));
}
return exp2l(y * log2l(x));
}