X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fmath%2Fnextafterf.c;h=bdc88cab69c6d35c513248b1c71a2e090350f8c4;hb=f18521465074f301f44d4cb825543b035c4ad191;hp=cba2dbe4ae071f811cc087ae30dca68ec7f38592;hpb=fc04675a09587031d5daebcb877b73976890b71d;p=libm diff --git a/src/math/nextafterf.c b/src/math/nextafterf.c index cba2dbe..bdc88ca 100644 --- a/src/math/nextafterf.c +++ b/src/math/nextafterf.c @@ -40,15 +40,15 @@ float nextafterf(float x, float y) } if (hx >= 0) { /* x > 0 */ if (hx > hy) { /* x > y, x -= ulp */ - hx -= 1; + hx--; } else { /* x < y, x += ulp */ - hx += 1; + hx++; } } else { /* x < 0 */ if (hy >= 0 || hx > hy) { /* x < y, x -= ulp */ - hx -= 1; + hx--; } else { /* x > y, x += ulp */ - hx += 1; + hx++; } } hy = hx & 0x7f800000;