Back to index

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

Go to the source code of this file.

Functions

float __powf (float x, float y)

Function Documentation

float __powf ( float  x,
float  y 
)

Definition at line 31 of file w_powf.c.

{
#ifdef _IEEE_LIBM
       return  __ieee754_powf(x,y);
#else
       float z;
       z=__ieee754_powf(x,y);
       if(_LIB_VERSION == _IEEE_|| __isnanf(y)) return z;
       if(__isnanf(x)) {
           if(y==(float)0.0)
               /* powf(NaN,0.0) */
               return (float)__kernel_standard((double)x,(double)y,142);
           else
              return z;
       }
       if(x==(float)0.0) {
           if(y==(float)0.0)
               /* powf(0.0,0.0) */
               return (float)__kernel_standard((double)x,(double)y,120);
           if(__finitef(y)&&y<(float)0.0) {
             if (signbit (x) && signbit (z))
               /* powf(0.0,negative) */
               return (float)__kernel_standard((double)x,(double)y,123);
             else
               return (float)__kernel_standard((double)x,(double)y,143);
           }
           return z;
       }
       if(!__finitef(z)) {
           if(__finitef(x)&&__finitef(y)) {
               if(__isnanf(z))
                  /* powf neg**non-int */
                   return (float)__kernel_standard((double)x,(double)y,124);
               else
                  /* powf overflow */
                   return (float)__kernel_standard((double)x,(double)y,121);
           }
       }
       if(z==(float)0.0&&__finitef(x)&&__finitef(y))
           /* powf underflow */
           return (float)__kernel_standard((double)x,(double)y,122);
       return z;
#endif
}

Here is the call graph for this function: