29 #ifdef POK_NEEDS_LIBMATH
39 #include "math_private.h"
42 nextafter(
double x,
double y)
47 EXTRACT_WORDS(hx,lx,x);
48 EXTRACT_WORDS(hy,ly,y);
52 if(((ix>=0x7ff00000)&&((ix-0x7ff00000)|lx)!=0) ||
53 ((iy>=0x7ff00000)&&((iy-0x7ff00000)|ly)!=0))
57 INSERT_WORDS(x,hy&0x80000000,1);
59 if(y==x)
return y;
else return x;
62 if(hx>hy||((hx==hy)&&(lx>ly))) {
70 if(hy>=0||hx>hy||((hx==hy)&&(lx>ly))){
79 if(hy>=0x7ff00000)
return x+x;
83 INSERT_WORDS(y,hx,lx);
87 INSERT_WORDS(x,hx,lx);