add significand[fl] math functions
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
#define _GNU_SOURCE
|
||||
#include <math.h>
|
||||
|
||||
double significand(double x)
|
||||
{
|
||||
return scalbn(x, -ilogb(x));
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
#define _GNU_SOURCE
|
||||
#include <math.h>
|
||||
|
||||
float significandf(float x)
|
||||
{
|
||||
return scalbnf(x, -ilogbf(x));
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
#define _GNU_SOURCE
|
||||
#include <math.h>
|
||||
|
||||
long double significandl(long double x)
|
||||
{
|
||||
return scalbnl(x, -ilogbl(x));
|
||||
}
|
||||
Reference in New Issue
Block a user