mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:27:35 +00:00
LibM: Add nan{f, l}
This commit is contained in:
parent
efe4845c56
commit
b07310dc8b
2 changed files with 19 additions and 0 deletions
|
@ -303,6 +303,21 @@ static FloatT internal_copysign(FloatT x, FloatT y) NOEXCEPT
|
||||||
|
|
||||||
extern "C" {
|
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
|
double trunc(double x) NOEXCEPT
|
||||||
{
|
{
|
||||||
return internal_to_integer(x, RoundingMode::ToZero);
|
return internal_to_integer(x, RoundingMode::ToZero);
|
||||||
|
|
|
@ -77,6 +77,10 @@ __BEGIN_DECLS
|
||||||
#define DOUBLE_MAX ((double)0b0111111111101111111111111111111111111111111111111111111111111111)
|
#define DOUBLE_MAX ((double)0b0111111111101111111111111111111111111111111111111111111111111111)
|
||||||
#define DOUBLE_MIN ((double)0b0000000000010000000000000000000000000000000000000000000000000000)
|
#define DOUBLE_MIN ((double)0b0000000000010000000000000000000000000000000000000000000000000000)
|
||||||
|
|
||||||
|
long double nanl(const char*) NOEXCEPT;
|
||||||
|
double nan(const char*) NOEXCEPT;
|
||||||
|
float nanf(const char*) NOEXCEPT;
|
||||||
|
|
||||||
double acos(double) NOEXCEPT;
|
double acos(double) NOEXCEPT;
|
||||||
float acosf(float) NOEXCEPT;
|
float acosf(float) NOEXCEPT;
|
||||||
double asin(double) NOEXCEPT;
|
double asin(double) NOEXCEPT;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue