This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0d71ffa
)
fdim NaN guard.
author
Jarkko Hietaniemi
<jhi@iki.fi>
Sat, 15 Nov 2014 00:42:21 +0000
(19:42 -0500)
committer
Jarkko Hietaniemi
<jhi@iki.fi>
Sat, 15 Nov 2014 01:07:22 +0000
(20:07 -0500)
ext/POSIX/POSIX.xs
patch
|
blob
|
blame
|
history
diff --git
a/ext/POSIX/POSIX.xs
b/ext/POSIX/POSIX.xs
index
923b3d3
..
a9c729a
100644
(file)
--- a/
ext/POSIX/POSIX.xs
+++ b/
ext/POSIX/POSIX.xs
@@
-643,7
+643,7
@@
static NV my_expm1(NV x)
#ifndef c99_fdim
static NV my_fdim(NV x, NV y)
{
- return
x > y ? x - y : 0
;
+ return
(Perl_isnan(x) || Perl_isnan(y)) ? NV_NAN : (x > y ? x - y : 0)
;
}
# define c99_fdim my_fdim
#endif