X-Git-Url: http://nsz.repo.hu/git/?p=libm;a=blobdiff_plain;f=src%2Fmath%2Fnexttowardf.c;h=c52ef3aae78173c5c5c167402fa73f3345dc1a4a;hp=5e1616ad3e8221271be42b1309a169c7a0fa0eeb;hb=5298ab468eb88cace2413703ac409009efaa8ca7;hpb=781e3284dddd0d9cc713603f4bd05442df78e09a diff --git a/src/math/nexttowardf.c b/src/math/nexttowardf.c index 5e1616a..c52ef3a 100644 --- a/src/math/nexttowardf.c +++ b/src/math/nexttowardf.c @@ -42,9 +42,9 @@ float nexttowardf(float x, long double y) return x; } if (hx >= 0 ^ x < y) /* x -= ulp */ - hx -= 1; + hx--; else /* x += ulp */ - hx += 1; + hx++; ix = hx & 0x7f800000; if (ix >= 0x7f800000) /* overflow */ return x+x;