diff --git a/Userland/Libraries/LibM/math.cpp b/Userland/Libraries/LibM/math.cpp index 47411254274..978d62c8065 100644 --- a/Userland/Libraries/LibM/math.cpp +++ b/Userland/Libraries/LibM/math.cpp @@ -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; diff --git a/Userland/Libraries/LibM/math.h b/Userland/Libraries/LibM/math.h index 194e049162b..f0ca9d618a3 100644 --- a/Userland/Libraries/LibM/math.h +++ b/Userland/Libraries/LibM/math.h @@ -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;