32 #ifdef POK_NEEDS_LIBMATH
34 #include "namespace.h"
35 #include "math_private.h"
39 __weak_alias(cosf, _cosf)
44 static const float one=1.0;
57 if(ix <= 0x3f490fd8)
return __kernel_cosf(x,z);
60 else if (ix>=0x7f800000)
return x-x;
64 n = __ieee754_rem_pio2f(x,y);
66 case 0:
return __kernel_cosf(y[0],y[1]);
67 case 1:
return -__kernel_sinf(y[0],y[1],1);
68 case 2:
return -__kernel_cosf(y[0],y[1]);
70 return __kernel_sinf(y[0],y[1],1);