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:
d6876a3
)
POSIX: emulation for logb()
author
Jarkko Hietaniemi
<jhi@iki.fi>
Thu, 12 Mar 2015 11:24:59 +0000
(07:24 -0400)
committer
Jarkko Hietaniemi
<jhi@iki.fi>
Thu, 12 Mar 2015 12:11:04 +0000
(08:11 -0400)
ext/POSIX/POSIX.xs
patch
|
blob
|
blame
|
history
diff --git
a/ext/POSIX/POSIX.xs
b/ext/POSIX/POSIX.xs
index
7652416
..
5a2c306
100644
(file)
--- a/
ext/POSIX/POSIX.xs
+++ b/
ext/POSIX/POSIX.xs
@@
-2322,6
+2322,8
@@
acos(x)
case 20:
#ifdef c99_logb
RETVAL = c99_logb(x);
+#elif defined(c99_log2) && FLT_RADIX == 2
+ RETVAL = Perl_floor(c99_log2(PERL_ABS(x)));
#else
not_here("logb");
#endif