musl - musl - an implementation of the standard library for Linux-based systems

index : musl
musl - an implementation of the standard library for Linux-based systems
summary refs log tree commit diff
path: root/src/math/fmal.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/math/fmal.c')
-rw-r--r--src/math/fmal.c 8
1 files changed, 4 insertions, 4 deletions
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);
generated by cgit v1.2.1 (git 2.18.0) at 2025年10月08日 04:02:19 +0000

AltStyle によって変換されたページ (->オリジナル) /