base/math/w_pow.c
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
#include "math.h"
00020
#include "mathP.h"
00021
00022
00023
#ifdef __STDC__
00024
double pow(
double x,
double y)
00025 #
else
00026 double pow(x,y)
00027 double x,y;
00028 #endif
00029 {
00030
#ifdef _IEEE_LIBM
00031
return __ieee754_pow(x,y);
00032
#else
00033
double z;
00034 z=
__ieee754_pow(x,y);
00035
if(
_LIB_VERSION == _IEEE_|| isnan(y))
return z;
00036
if(isnan(x)) {
00037
if(y==0.0)
00038
return __kernel_standard(x,y,42);
00039
else
00040
return z;
00041 }
00042
if(x==0.0){
00043
if(y==0.0)
00044
return __kernel_standard(x,y,20);
00045
if(
finite(y)&&y<0.0)
00046
return __kernel_standard(x,y,23);
00047
return z;
00048 }
00049
if(!
finite(z)) {
00050
if(
finite(x)&&
finite(y)) {
00051
if(isnan(z))
00052
return __kernel_standard(x,y,24);
00053
else
00054
return __kernel_standard(x,y,21);
00055 }
00056 }
00057
if(z==0.0&&
finite(x)&&
finite(y))
00058
return __kernel_standard(x,y,22);
00059
return z;
00060
#endif
00061
}
Generated on Thu Nov 20 11:49:52 2008 for RTAI API by
1.3.8