X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fmath%2Ffmal.c;h=cbaf46ebec926516f3abd6afa7fd76212ff6a4aa;hb=da7458a602a6f0bdea25d6b9b613372048a974e6;hp=3944c29298e108c861d1c0f6aee9a7fe6264ebdc;hpb=2e77dc13f8bc2053642fcb136996f5f36c88c775;p=musl diff --git a/src/math/fmal.c b/src/math/fmal.c index 3944c292..cbaf46eb 100644 --- a/src/math/fmal.c +++ b/src/math/fmal.c @@ -173,14 +173,14 @@ long double fmal(long double x, long double y, long double z) * return values here are crucial in handling special cases involving * infinities, NaNs, overflows, and signed zeroes correctly. */ - if (x == 0.0 || y == 0.0) - return (x * y + z); - if (z == 0.0) - return (x * y); if (!isfinite(x) || !isfinite(y)) return (x * y + z); if (!isfinite(z)) return (z); + if (x == 0.0 || y == 0.0) + return (x * y + z); + if (z == 0.0) + return (x * y); xs = frexpl(x, &ex); ys = frexpl(y, &ey);