Back to index

glibc  2.9
Functions | Variables
s_frexp.c File Reference
#include "math.h"
#include "math_private.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

double __frexp (double x, int *eptr)

Variables

static double two54 = 1.80143985094819840000e+16

Function Documentation

double __frexp ( double  x,
int eptr 
)

Definition at line 40 of file s_frexp.c.

{
       int32_t hx, ix, lx;
       EXTRACT_WORDS(hx,lx,x);
       ix = 0x7fffffff&hx;
       *eptr = 0;
       if(ix>=0x7ff00000||((ix|lx)==0)) return x;       /* 0,inf,nan */
       if (ix<0x00100000) {        /* subnormal */
           x *= two54;
           GET_HIGH_WORD(hx,x);
           ix = hx&0x7fffffff;
           *eptr = -54;
       }
       *eptr += (ix>>20)-1022;
       hx = (hx&0x800fffff)|0x3fe00000;
       SET_HIGH_WORD(x,hx);
       return x;
}

Here is the caller graph for this function:


Variable Documentation

double two54 = 1.80143985094819840000e+16 [static]

Definition at line 35 of file s_frexp.c.