diff options
author | Ulrich Drepper <drepper@redhat.com> | 1997-03-20 03:23:21 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1997-03-20 03:23:21 +0000 |
commit | c55caac80eb5de1b1bf273e38c6f01c6308f01b3 (patch) | |
tree | a775ad06ce2bf9d041dd325a4ea9b5767e79eab3 /sysdeps/libm-ieee754/w_pow.c | |
parent | 46da0971fe3287760356549436140a80204d3c47 (diff) |
Add definition for `signbit' function. Future releases will have this
function.
Diffstat (limited to 'sysdeps/libm-ieee754/w_pow.c')
-rw-r--r-- | sysdeps/libm-ieee754/w_pow.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sysdeps/libm-ieee754/w_pow.c b/sysdeps/libm-ieee754/w_pow.c index 1711d71bda..f1a9b98dfd 100644 --- a/sysdeps/libm-ieee754/w_pow.c +++ b/sysdeps/libm-ieee754/w_pow.c @@ -20,6 +20,18 @@ #include "math_private.h" +/* This is a quick hack for now. In version 2.1.x we'll have a real + function. */ +static inline int +signbit (double x) +{ + int32_t hx; + + GET_HIGH_WORD (hx, x); + return hx & 0x80000000; +} + + #ifdef __STDC__ double __pow(double x, double y) /* wrapper pow */ #else |