mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:27:44 +00:00
LibM: Add 'isnormal'
This commit is contained in:
parent
8a94622e54
commit
9054811ace
2 changed files with 12 additions and 0 deletions
|
@ -536,4 +536,11 @@ double erfc(double x)
|
||||||
{
|
{
|
||||||
return 1 - erf(x);
|
return 1 - erf(x);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int isnormal(double x)
|
||||||
|
{
|
||||||
|
if (x < 0)
|
||||||
|
x = -x;
|
||||||
|
return x >= DOUBLE_MIN && x <= DOUBLE_MAX;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,6 +42,9 @@ __BEGIN_DECLS
|
||||||
#define M_SQRT2 1.4142135623730951
|
#define M_SQRT2 1.4142135623730951
|
||||||
#define M_SQRT1_2 0.7071067811865475
|
#define M_SQRT1_2 0.7071067811865475
|
||||||
|
|
||||||
|
#define DOUBLE_MAX ((double)0b0111111111101111111111111111111111111111111111111111111111111111)
|
||||||
|
#define DOUBLE_MIN ((double)0b0000000000010000000000000000000000000000000000000000000000000000)
|
||||||
|
|
||||||
double acos(double);
|
double acos(double);
|
||||||
float acosf(float);
|
float acosf(float);
|
||||||
double asin(double);
|
double asin(double);
|
||||||
|
@ -110,4 +113,6 @@ double hypot(double, double);
|
||||||
double erf(double);
|
double erf(double);
|
||||||
double erfc(double);
|
double erfc(double);
|
||||||
|
|
||||||
|
int isnormal(double);
|
||||||
|
|
||||||
__END_DECLS
|
__END_DECLS
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue