---
mingw-w64-crt/Makefile.am | 12 ++++++++++++
mingw-w64-crt/math/arm-common/expm1.c | 12 ++++++++++++
mingw-w64-crt/math/arm-common/expm1f.c | 15 +++++++++++++++
mingw-w64-crt/math/arm-common/expm1l.c | 16 ++++++++++++++++
mingw-w64-crt/math/arm-common/log1p.c | 12 ++++++++++++
mingw-w64-crt/math/arm-common/log1pf.c | 15 +++++++++++++++
mingw-w64-crt/math/arm-common/log1pl.c | 16 ++++++++++++++++
7 files changed, 98 insertions(+)
create mode 100644 mingw-w64-crt/math/arm-common/expm1.c
create mode 100644 mingw-w64-crt/math/arm-common/expm1f.c
create mode 100644 mingw-w64-crt/math/arm-common/expm1l.c
create mode 100644 mingw-w64-crt/math/arm-common/log1p.c
create mode 100644 mingw-w64-crt/math/arm-common/log1pf.c
create mode 100644 mingw-w64-crt/math/arm-common/log1pl.c
diff --git a/mingw-w64-crt/Makefile.am b/mingw-w64-crt/Makefile.am
index a60b48d51..42031291f 100644
--- a/mingw-w64-crt/Makefile.am
+++ b/mingw-w64-crt/Makefile.am
@@ -259,6 +259,12 @@ src_msvcrtarm32+=\
math/arm/trunc.S \
math/arm/truncf.S \
math/arm-common/copysignl.c \
+ math/arm-common/expm1.c \
+ math/arm-common/expm1f.c \
+ math/arm-common/expm1l.c \
+ math/arm-common/log1p.c \
+ math/arm-common/log1pf.c \
+ math/arm-common/log1pl.c \
math/arm-common/log2.c \
math/arm-common/remainder.c \
math/arm-common/remainderf.c \
@@ -272,6 +278,12 @@ endif
src_msvcrtarm64=\
$(src_msvcrt) \
math/arm-common/copysignl.c \
+ math/arm-common/expm1.c \
+ math/arm-common/expm1f.c \
+ math/arm-common/expm1l.c \
+ math/arm-common/log1p.c \
+ math/arm-common/log1pf.c \
+ math/arm-common/log1pl.c \
math/arm-common/log2.c \
math/arm-common/remainder.c \
math/arm-common/remainderf.c \
diff --git a/mingw-w64-crt/math/arm-common/expm1.c
b/mingw-w64-crt/math/arm-common/expm1.c
new file mode 100644
index 000000000..578bb446a
--- /dev/null
+++ b/mingw-w64-crt/math/arm-common/expm1.c
@@ -0,0 +1,12 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+
+#include <math.h>
+
+double expm1(double x)
+{
+ return exp(x) - 1.0;
+}
diff --git a/mingw-w64-crt/math/arm-common/expm1f.c
b/mingw-w64-crt/math/arm-common/expm1f.c
new file mode 100644
index 000000000..a810b7186
--- /dev/null
+++ b/mingw-w64-crt/math/arm-common/expm1f.c
@@ -0,0 +1,15 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+
+#include <math.h>
+
+float expm1f(float x)
+{
+ // Intentionally using double version of exp() here in the float version of
+ // expm1, to preserve as much accuracy as possible in the intermediate
+ // result.
+ return exp(x) - 1.0;
+}
diff --git a/mingw-w64-crt/math/arm-common/expm1l.c
b/mingw-w64-crt/math/arm-common/expm1l.c
new file mode 100644
index 000000000..baf4da23a
--- /dev/null
+++ b/mingw-w64-crt/math/arm-common/expm1l.c
@@ -0,0 +1,16 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+
+#include <math.h>
+
+long double expm1l(long double x)
+{
+#if defined(__arm__) || defined(_ARM_) || defined(__aarch64__) ||
defined(_ARM64_)
+ return expm1(x);
+#else
+#error Not supported on your platform yet
+#endif
+}
diff --git a/mingw-w64-crt/math/arm-common/log1p.c
b/mingw-w64-crt/math/arm-common/log1p.c
new file mode 100644
index 000000000..ea75d75b5
--- /dev/null
+++ b/mingw-w64-crt/math/arm-common/log1p.c
@@ -0,0 +1,12 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+
+#include <math.h>
+
+double log1p(double x)
+{
+ return log(x + 1.0);
+}
diff --git a/mingw-w64-crt/math/arm-common/log1pf.c
b/mingw-w64-crt/math/arm-common/log1pf.c
new file mode 100644
index 000000000..e94713126
--- /dev/null
+++ b/mingw-w64-crt/math/arm-common/log1pf.c
@@ -0,0 +1,15 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+
+#include <math.h>
+
+float log1pf(float x)
+{
+ // Intentionally using double version of log() here in the float version of
+ // log1p, to preserve as much accuracy as possible in the intermediate
+ // parameter.
+ return log(x + 1.0);
+}
diff --git a/mingw-w64-crt/math/arm-common/log1pl.c
b/mingw-w64-crt/math/arm-common/log1pl.c
new file mode 100644
index 000000000..c2b321a26
--- /dev/null
+++ b/mingw-w64-crt/math/arm-common/log1pl.c
@@ -0,0 +1,16 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+
+#include <math.h>
+
+long double log1pl(long double x)
+{
+#if defined(__arm__) || defined(_ARM_) || defined(__aarch64__) ||
defined(_ARM64_)
+ return log1p(x);
+#else
+#error Not supported on your platform yet
+#endif
+}
--
2.17.1
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public