projects
/
musl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b1cbd70
)
fmal bug fix: nan input should not raise exception
author
nsz
<nsz@port70.net>
Sun, 18 Mar 2012 23:59:16 +0000
(
00:59
+0100)
committer
nsz
<nsz@port70.net>
Sun, 18 Mar 2012 23:59:16 +0000
(
00:59
+0100)
src/math/fmal.c
patch
|
blob
|
history
diff --git
a/src/math/fmal.c
b/src/math/fmal.c
index
3944c29
..
cbaf46e
100644
(file)
--- 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.
*/
* 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 (!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);
xs = frexpl(x, &ex);
ys = frexpl(y, &ey);