Back to index

lightning-sunbird  0.9+nobinonly
s_logb.c File Reference
#include "fdlibm.h"

Go to the source code of this file.


double fd_logb (double x)

Function Documentation

double fd_logb ( double  x)

Definition at line 63 of file s_logb.c.

       int lx,ix;
        fd_twoints u;

        u.d = x;
       ix = (__HI(u))&0x7fffffff;  /* high |x| */
       lx = __LO(u);               /* low x */
       if((ix|lx)==0) return -1.0/fd_fabs(x);
       if(ix>=0x7ff00000) return x*x;
       if((ix>>=20)==0)                   /* IEEE 754 logb */
              return -1022.0; 
              return (double) (ix-1023); 

Here is the call graph for this function: