diff options
author | Rich Felker <dalias@aerifal.cx> | 2012-08-13 14:51:43 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2012-08-13 14:51:43 -0400 |
commit | 2242bf616b893e85886ed0a2348b96bf1cf7623e (patch) | |
tree | e6e88ad8040ab298898509aabe5a77fee0808d12 /src/math/significand.c | |
parent | 0c42beb5f90fe5583c2cae5a31c2ef68847974e3 (diff) | |
download | musl-2242bf616b893e85886ed0a2348b96bf1cf7623e.tar.gz |
add significand[fl] math functions
Diffstat (limited to 'src/math/significand.c')
-rw-r--r-- | src/math/significand.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/math/significand.c b/src/math/significand.c new file mode 100644 index 00000000..40d9aa9f --- /dev/null +++ b/src/math/significand.c @@ -0,0 +1,7 @@ +#define _GNU_SOURCE +#include <math.h> + +double significand(double x) +{ + return scalbn(x, -ilogb(x)); +} |