1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 14:28:12 +00:00

LibM: Add nan{f, l}

This commit is contained in:
Mițca Dumitru 2021-03-07 23:53:29 +02:00 committed by Andreas Kling
parent efe4845c56
commit b07310dc8b
2 changed files with 19 additions and 0 deletions

View file

@ -303,6 +303,21 @@ static FloatT internal_copysign(FloatT x, FloatT y) NOEXCEPT
extern "C" {
float nanf(const char* s) NOEXCEPT
{
return __builtin_nanf(s);
}
double nan(const char* s) NOEXCEPT
{
return __builtin_nan(s);
}
long double nanl(const char* s) NOEXCEPT
{
return __builtin_nanl(s);
}
double trunc(double x) NOEXCEPT
{
return internal_to_integer(x, RoundingMode::ToZero);