mirror of
https://github.com/RGBCube/serenity
synced 2025-07-02 23:42:13 +00:00
LibM: Implement path for negative powers
This commit is contained in:
parent
71fc7ac7ac
commit
c74d7adac6
1 changed files with 4 additions and 0 deletions
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue