[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master bfb73bb2 09/13: Use fdlibm header more broadl
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master bfb73bb2 09/13: Use fdlibm header more broadly |
Date: |
Mon, 23 May 2022 17:40:27 -0400 (EDT) |
branch: master
commit bfb73bb280c3c48e97e80d387a0d31d33db591e5
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Use fdlibm header more broadly
---
fdlibm.hpp | 10 ++++++++++
fdlibm_expm1.c | 2 --
fdlibm_log1p.c | 2 --
math_functions.hpp | 5 ++---
4 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/fdlibm.hpp b/fdlibm.hpp
index 76cde780..6f414297 100644
--- a/fdlibm.hpp
+++ b/fdlibm.hpp
@@ -65,4 +65,14 @@
# error Unknown endianness.
#endif // unknown endianness
+#if defined __cplusplus
+extern "C"
+{
+#endif // defined __cplusplus
+double fdlibm_expm1(double);
+double fdlibm_log1p(double);
+#if defined __cplusplus
+} // extern "C"
+#endif // defined __cplusplus
+
#endif // fdlibm_hpp
diff --git a/fdlibm_expm1.c b/fdlibm_expm1.c
index 5ed45732..64738916 100644
--- a/fdlibm_expm1.c
+++ b/fdlibm_expm1.c
@@ -162,8 +162,6 @@ Q3 = -7.93650757867487942473e-05, /* BF14CE19 9EAADBB7 */
Q4 = 4.00821782732936239552e-06, /* 3ED0CFCA 86E65239 */
Q5 = -2.01099218183624371326e-07; /* BE8AFDB7 6E09C32D */
-double fdlibm_expm1(double);
-
#if defined __STDC__
double fdlibm_expm1(double x)
#else // !defined __STDC__
diff --git a/fdlibm_log1p.c b/fdlibm_log1p.c
index e1755471..db6eadd1 100644
--- a/fdlibm_log1p.c
+++ b/fdlibm_log1p.c
@@ -130,8 +130,6 @@ Lp7 = 1.479819860511658591e-01; /* 3FC2F112 DF3E5244 */
static double zero = 0.0;
-double fdlibm_log1p(double);
-
#if defined __STDC__
double fdlibm_log1p(double x)
#else // !defined __STDC__
diff --git a/math_functions.hpp b/math_functions.hpp
index b32bd3c2..05f9a34b 100644
--- a/math_functions.hpp
+++ b/math_functions.hpp
@@ -24,6 +24,8 @@
#include "config.hpp"
+#include "fdlibm.hpp" // fdlibm_expm1(), fdlibm_log1p()
+
#include <algorithm> // max(), min(), transform()
#include <cmath> // expm1(), log1p(), signbit()
#include <limits>
@@ -32,9 +34,6 @@
#include <type_traits> // /is_.*/
#include <vector>
-extern "C" double fdlibm_expm1(double);
-extern "C" double fdlibm_log1p(double);
-
namespace lmi
{
inline double expm1(double z) {return fdlibm_expm1(z);}
- [lmi-commits] [lmi] master updated (ad1f8a2f -> 599c44b7), Greg Chicares, 2022/05/23
- [lmi-commits] [lmi] master 38dd359d 04/13: Apply 'fdlibm*.c' changes to 'fdlibm.h', Greg Chicares, 2022/05/23
- [lmi-commits] [lmi] master a456d40d 03/13: Expunge unwanted part of fdlibm header, Greg Chicares, 2022/05/23
- [lmi-commits] [lmi] master 9d7e3be1 02/13: Import header from fdlibm, Greg Chicares, 2022/05/23
- [lmi-commits] [lmi] master e5850c2a 12/13: Import Naohiko Shimizu's NetBSD performance improvements, Greg Chicares, 2022/05/23
- [lmi-commits] [lmi] master bfb73bb2 09/13: Use fdlibm header more broadly,
Greg Chicares <=
- [lmi-commits] [lmi] master 599c44b7 13/13: Draw attention to atrocious type puns, Greg Chicares, 2022/05/23
- [lmi-commits] [lmi] master 164db076 10/13: Assume __STDC__ for fdlibm, Greg Chicares, 2022/05/23
- [lmi-commits] [lmi] master 7d5c739b 01/13: Expunge unused declarations and macro, Greg Chicares, 2022/05/23
- [lmi-commits] [lmi] master d7294669 06/13: Add include guards; include a header required by lmi, Greg Chicares, 2022/05/23
- [lmi-commits] [lmi] master adf263fe 11/13: Assume __STDC__ everywhere appropriate, Greg Chicares, 2022/05/23
- [lmi-commits] [lmi] master edb56e9b 05/13: Add license and copyright boilerplate, Greg Chicares, 2022/05/23
- [lmi-commits] [lmi] master 50b2645a 08/13: Use fdlibm header, Greg Chicares, 2022/05/23
- [lmi-commits] [lmi] master 89966e80 07/13: Rename fdlibm header, Greg Chicares, 2022/05/23