mirror of
https://github.com/RGBCube/serenity
synced 2025-07-24 23:27:42 +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;
|
result = 1.0l / result;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
if (x < 0) {
|
||||||
|
return 1.l / exp2l(y * log2l(-x));
|
||||||
|
}
|
||||||
|
|
||||||
return exp2l(y * log2l(x));
|
return exp2l(y * log2l(x));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue