1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 23:17:45 +00:00

LibM: Implement more rounding functions

This patch implements the entire rint family, while taking into account
the current rounding mode, and implements ceil, round, trunc, and floor
for types which they weren't before.
This commit is contained in:
Mițca Dumitru 2021-03-07 23:47:07 +02:00 committed by Andreas Kling
parent 88d342d007
commit efe4845c56
2 changed files with 83 additions and 6 deletions

View file

@ -99,12 +99,24 @@ double tanh(double) NOEXCEPT;
float tanhf(float) NOEXCEPT;
double ceil(double) NOEXCEPT;
float ceilf(float) NOEXCEPT;
long double ceill(long double) NOEXCEPT;
double floor(double) NOEXCEPT;
float floorf(float) NOEXCEPT;
long double floorl(long double) NOEXCEPT;
double trunc(double) NOEXCEPT;
float truncf(float) NOEXCEPT;
long double truncl(long double) NOEXCEPT;
double round(double) NOEXCEPT;
float roundf(float) NOEXCEPT;
long double roundl(long double) NOEXCEPT;
double rint(double) NOEXCEPT;
float rintf(float) NOEXCEPT;
long lrintl(long double) NOEXCEPT;
long lrint(double) NOEXCEPT;
long lrintf(float) NOEXCEPT;
long long llrintl(long double) NOEXCEPT;
long long llrint(double) NOEXCEPT;
long long llrintf(float) NOEXCEPT;
double fabs(double) NOEXCEPT;
float fabsf(float) NOEXCEPT;
double fmod(double, double) NOEXCEPT;