X-Git-Url: http://nsz.repo.hu/git/?p=libm;a=blobdiff_plain;f=src%2Fmath%2Fnextafterf.c;h=bdc88cab69c6d35c513248b1c71a2e090350f8c4;hp=cba2dbe4ae071f811cc087ae30dca68ec7f38592;hb=5298ab468eb88cace2413703ac409009efaa8ca7;hpb=781e3284dddd0d9cc713603f4bd05442df78e09a 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;