Back to index

glibc  2.9
Functions
e_scalb.c File Reference
#include <fenv.h>
#include <math.h>
#include "math_private.h"

Go to the source code of this file.

Functions

double __ieee754_scalb (double x, double fn)

Function Documentation

double __ieee754_scalb ( double  x,
double  fn 
)

Definition at line 38 of file e_scalb.c.

{
#ifdef _SCALB_INT
       return __scalbn(x,fn);
#else
       if (__isnan(x)||__isnan(fn)) return x*fn;
       if (!__finite(fn)) {
           if(fn>0.0) return x*fn;
           else if (x == 0)
             return x;
           else if (!__finite (x))
             {
# ifdef FE_INVALID
              feraiseexcept (FE_INVALID);
# endif
              return __nan ("");
             }
           else       return x/(-fn);
       }
       if (__rint(fn)!=fn)
         {
# ifdef FE_INVALID
           feraiseexcept (FE_INVALID);
# endif
           return __nan ("");
         }
       if ( fn > 65000.0) return __scalbn(x, 65000);
       if (-fn > 65000.0) return __scalbn(x,-65000);
       return __scalbn(x,(int)fn);
#endif
}

Here is the call graph for this function:

Here is the caller graph for this function: