Back to index

glibc  2.9
Functions
s_frexpl.c File Reference
#include <float.h>
#include "math.h"
#include "math_private.h"

Go to the source code of this file.

Functions

static long double long double __frexpl (long double x, int *eptr)

Function Documentation

static long double long double __frexpl ( long double  x,
int eptr 
) [static]

Definition at line 50 of file s_frexpl.c.

{
       u_int32_t se, hx, ix, lx;
       GET_LDOUBLE_WORDS(se,hx,lx,x);
       ix = 0x7fff&se;
       *eptr = 0;
       if(ix==0x7fff||((ix|hx|lx)==0)) return x; /* 0,inf,nan */
       if (ix==0x0000) {           /* subnormal */
           x *= two65;
           GET_LDOUBLE_EXP(se,x);
           ix = se&0x7fff;
           *eptr = -65;
       }
       *eptr += ix-16382;
       se = (se & 0x8000) | 0x3ffe;
       SET_LDOUBLE_EXP(x,se);
       return x;
}