Signed-off-by: Martin Storsjö <[email protected]>
---
 mingw-w64-crt/math/erfl.c       | 12 ++++++++++++
 mingw-w64-crt/math/fp_constsl.c |  5 +++++
 mingw-w64-crt/math/lgammal.c    | 11 ++++++++++-
 mingw-w64-crt/math/tgammal.c    | 10 +++++++++-
 4 files changed, 36 insertions(+), 2 deletions(-)

diff --git a/mingw-w64-crt/math/erfl.c b/mingw-w64-crt/math/erfl.c
index 3832fe9e0..50dcbb350 100644
--- a/mingw-w64-crt/math/erfl.c
+++ b/mingw-w64-crt/math/erfl.c
@@ -108,6 +108,17 @@ Copyright 1984, 1995 by Stephen L. Moshier
 
 long double erfl(long double x);
 
+#if defined(__arm__) || defined(_ARM_) || defined(__aarch64__) || 
defined(_ARM64_)
+long double erfcl(long double x)
+{
+       return erfc(x);
+}
+
+long double erfl(long double x)
+{
+       return erf(x);
+}
+#else
 /* erfc(x) = exp(-x^2) P(1/x)/Q(1/x)
    1/8 <= 1/x <= 1
    Peak relative error 5.8e-21  */
@@ -301,3 +312,4 @@ long double erfl(long double x)
        y = x * polevll(z, T, 6) / p1evll(z, U, 6);
        return (y);
 }
+#endif
diff --git a/mingw-w64-crt/math/fp_constsl.c b/mingw-w64-crt/math/fp_constsl.c
index c9855df8a..880408209 100644
--- a/mingw-w64-crt/math/fp_constsl.c
+++ b/mingw-w64-crt/math/fp_constsl.c
@@ -4,6 +4,7 @@
  * No warranty is given; refer to the file DISCLAIMER.PD within this package.
  */
 #include "fp_consts.h"
+#include <math.h>
 
 const union _ieee_rep __QNANL = { __LONG_DOUBLE_QNAN_REP };
 const union _ieee_rep __SNANL = { __LONG_DOUBLE_SNAN_REP };
@@ -15,6 +16,10 @@ const union _ieee_rep __DENORML = { __LONG_DOUBLE_DENORM_REP 
};
 long double nanl (const char *);
 long double nanl (const char * tagp __attribute__((unused)) )
 {
+#if defined(__arm__) || defined(_ARM_) || defined(__aarch64__) || 
defined(_ARM64_)
+  return nan("");
+#else
   return __QNANL.ldouble_val;
+#endif
 }
 
diff --git a/mingw-w64-crt/math/lgammal.c b/mingw-w64-crt/math/lgammal.c
index edb9a7ebf..1806750c4 100644
--- a/mingw-w64-crt/math/lgammal.c
+++ b/mingw-w64-crt/math/lgammal.c
@@ -5,6 +5,15 @@
  */
 #include "cephes_mconf.h"
 
+#if defined(__arm__) || defined(_ARM_) || defined(__aarch64__) || 
defined(_ARM64_)
+double lgamma(double x);
+
+long double lgammal(long double x)
+{
+       return lgamma(x);
+}
+#else
+
 #if UNK
 static uLD S[9] = {
   { { -1.193945051381510095614E-3L } },
@@ -334,4 +343,4 @@ long double lgammal(long double x)
 {
        return (__lgammal_r (x, &signgam));
 }
-
+#endif
diff --git a/mingw-w64-crt/math/tgammal.c b/mingw-w64-crt/math/tgammal.c
index 4bfd979ff..18d32441f 100644
--- a/mingw-w64-crt/math/tgammal.c
+++ b/mingw-w64-crt/math/tgammal.c
@@ -5,6 +5,14 @@
  */
 #include "cephes_mconf.h"
 
+#if defined(__arm__) || defined(_ARM_) || defined(__aarch64__) || 
defined(_ARM64_)
+double tgamma(double x);
+
+long double tgammal(long double x)
+{
+       return tgamma(x);
+}
+#else
 /*
 gamma(x+2)  = gamma(x+2) P(x)/Q(x)
 0 <= x <= 1
@@ -398,4 +406,4 @@ long double tgammal(long double x)
        int local_sgngaml = 0;
        return (__tgammal_r(x, &local_sgngaml));
 }
-
+#endif
-- 
2.17.1



_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to