Skip to content

Commit 4e7c5ab

Browse files
committed
Change coding style
1 parent 7dba022 commit 4e7c5ab

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

Modules/mathmodule.c

+3-5
Original file line numberDiff line numberDiff line change
@@ -2353,11 +2353,9 @@ math_fma_impl(PyObject *module, double x, double y, double z)
23532353
// Emscripten, musl C library), libc fma() doesn't implement
23542354
// IEEE 754-2008 properly: it doesn't use the right sign when the
23552355
// result is zero.
2356-
if (x && y) {
2357-
r = x * y;
2358-
}
2359-
else {
2360-
r = copysign(1, z) == 1 ? x*y + z : x*y;
2356+
r = x * y;
2357+
if ((!x || !y) && copysign(1, z) == 1) {
2358+
r += z;
23612359
}
23622360
}
23632361

0 commit comments

Comments
 (0)