mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-10 13:00:29 +03:00
LibM: Add nan{f, l}
This commit is contained in:
parent
efe4845c56
commit
b07310dc8b
Notes:
sideshowbarker
2024-07-18 21:35:39 +09:00
Author: https://github.com/RealKC Commit: https://github.com/SerenityOS/serenity/commit/b07310dc8b5 Pull-request: https://github.com/SerenityOS/serenity/pull/5688 Issue: https://github.com/SerenityOS/serenity/issues/4282 Reviewed-by: https://github.com/ADKaster Reviewed-by: https://github.com/BenWiederhake Reviewed-by: https://github.com/awesomekling
@ -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);
|
||||
|
@ -77,6 +77,10 @@ __BEGIN_DECLS
|
||||
#define DOUBLE_MAX ((double)0b0111111111101111111111111111111111111111111111111111111111111111)
|
||||
#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;
|
||||
float acosf(float) NOEXCEPT;
|
||||
double asin(double) NOEXCEPT;
|
||||
|
Loading…
Reference in New Issue
Block a user