Back to index

glibc  2.9
Functions
w_pow.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 __pow (double x, double y)

Function Documentation

double __pow ( double  x,
double  y 
)

Definition at line 26 of file w_pow.c.

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

Here is the call graph for this function: