Back to index

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

Go to the source code of this file.

Functions

double fd_pow (double x, double y)

Function Documentation

double fd_pow ( double  x,
double  y 
)

Definition at line 63 of file w_pow.c.

{
#ifdef _IEEE_LIBM
       return  __ieee754_pow(x,y);
#else
       double z;
    int err;
       z=__ieee754_pow(x,y);
       if(_LIB_VERSION == _IEEE_|| fd_isnan(y)) return z;
       if(fd_isnan(x)) {
           if(y==0.0) 
               return __kernel_standard(x,y,42,&err); /* pow(NaN,0.0) */
           else 
              return z;
       }
       if(x==0.0){ 
           if(y==0.0)
               return __kernel_standard(x,y,20,&err); /* pow(0.0,0.0) */
           if(fd_finite(y)&&y<0.0)
               return __kernel_standard(x,y,23,&err); /* pow(0.0,negative) */
           return z;
       }
       if(!fd_finite(z)) {
           if(fd_finite(x)&&fd_finite(y)) {
               if(fd_isnan(z))
                   return __kernel_standard(x,y,24,&err); /* pow neg**non-int */
               else 
                   return __kernel_standard(x,y,21,&err); /* pow overflow */
           }
       } 
       if(z==0.0&&fd_finite(x)&&fd_finite(y))
           return __kernel_standard(x,y,22,&err); /* pow underflow */
       return z;
#endif
}

Here is the call graph for this function:

Here is the caller graph for this function: