1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:38:11 +00:00

LibM: Add remainder{f, l}

These just forward their arguments to fmod, but I think that should be
fine.
This commit is contained in:
Mițca Dumitru 2021-03-14 20:25:04 +02:00 committed by Andreas Kling
parent e4197b7854
commit 32b9437c13
2 changed files with 19 additions and 0 deletions

View file

@ -631,6 +631,22 @@ float fmodf(float index, float period) NOEXCEPT
return index - trunc(index / period) * period;
}
// FIXME: These aren't exactly like fmod, but these definitions are probably good enough for now
long double remainderl(long double x, long double y) NOEXCEPT
{
return fmodl(x, y);
}
double remainder(double x, double y) NOEXCEPT
{
return fmod(x, y);
}
float remainderf(float x, float y) NOEXCEPT
{
return fmodf(x, y);
}
long double expl(long double exponent) NOEXCEPT
{
long double res = 0;