mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +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:
parent
e4197b7854
commit
32b9437c13
Notes:
sideshowbarker
2024-07-18 21:21:20 +09:00
Author: https://github.com/RealKC Commit: https://github.com/SerenityOS/serenity/commit/32b9437c13c Pull-request: https://github.com/SerenityOS/serenity/pull/5792
2 changed files with 19 additions and 0 deletions
|
@ -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;
|
||||
|
|
|
@ -107,6 +107,9 @@ float fabsf(float) NOEXCEPT;
|
|||
long double fmodl(long double, long double) NOEXCEPT;
|
||||
double fmod(double, double) NOEXCEPT;
|
||||
float fmodf(float, float) NOEXCEPT;
|
||||
long double remainderl(long double, long double) NOEXCEPT;
|
||||
double remainder(double, double) NOEXCEPT;
|
||||
float remainderf(float, float) NOEXCEPT;
|
||||
long double nanl(const char*) NOEXCEPT;
|
||||
double nan(const char*) NOEXCEPT;
|
||||
float nanf(const char*) NOEXCEPT;
|
||||
|
|
Loading…
Reference in a new issue