Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src-draft/trunk]: src/lib/libm/src Add dummy log2l to libm.



details:   https://anonhg.NetBSD.org/src-all/rev/a5de37a81636
branches:  trunk
changeset: 932681:a5de37a81636
user:      Taylor R Campbell <riastradh%NetBSD.org@localhost>
date:      Wed May 13 19:20:36 2020 +0000

description:
Add dummy log2l to libm.

diffstat:

 lib/libm/src/ldbl_dummy.c |  7 +++++++
 lib/libm/src/namespace.h  |  1 +
 2 files changed, 8 insertions(+), 0 deletions(-)

diffs (35 lines):

diff -r b7846c8752df -r a5de37a81636 lib/libm/src/ldbl_dummy.c
--- a/lib/libm/src/ldbl_dummy.c Tue May 12 21:56:17 2020 +0000
+++ b/lib/libm/src/ldbl_dummy.c Wed May 13 19:20:36 2020 +0000
@@ -42,6 +42,7 @@
 __weak_alias(atan2l, _atan2l)
 __weak_alias(hypotl, _hypotl)
 __weak_alias(logl, _logl)
+__weak_alias(log2l, _log2l)
 __weak_alias(log10l, _log10l)
 __weak_alias(expl, _expl)
 __weak_alias(exp2l, _exp2l)
@@ -80,6 +81,12 @@
 }
 
 long double
+log2l(long double x)
+{
+       return log2(x);
+}
+
+long double
 log10l(long double x)
 {
        return log10(x);
diff -r b7846c8752df -r a5de37a81636 lib/libm/src/namespace.h
--- a/lib/libm/src/namespace.h  Tue May 12 21:56:17 2020 +0000
+++ b/lib/libm/src/namespace.h  Wed May 13 19:20:36 2020 +0000
@@ -70,6 +70,7 @@
 #define tanhl _tanhl
 #define atanhl _atanhl
 #define log10l _log10l
+#define log2l _log2l
 
 #define erfl   _erfl
 #define erfcl  _erfcl



Home | Main Index | Thread Index | Old Index