aboutsummaryrefslogtreecommitdiff
path: root/math/exp.c
diff options
context:
space:
mode:
authorSzabolcs Nagy <szabolcs.nagy@arm.com>2019-08-28 15:15:15 +0100
committerSzabolcs Nagy <szabolcs.nagy@arm.com>2019-08-28 16:38:36 +0100
commitf934c862ff431f5da6c2e1e4dedb96cc4951cbf0 (patch)
tree0baf749809334b720627ff4f552eb19ec28665ae /math/exp.c
parent24b2750f455084affc265ca2d50d7558dd3bc5a8 (diff)
downloadarm-optimized-routines-f934c862ff431f5da6c2e1e4dedb96cc4951cbf0.tar.gz
math: add long double symbols when long double is same as double
To allow libmathlib.a to be a drop-in replacement for libc functions on 32bit arm, we should provide long double symbols otherwise the libc long double implementation may pull in double symbols that can conflict with libmathlib.a in case of static linking. Using wrappers instead of alias to avoid type declaration conflicts.
Diffstat (limited to 'math/exp.c')
-rw-r--r--math/exp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/math/exp.c b/math/exp.c
index ffd3111..1909b8e 100644
--- a/math/exp.c
+++ b/math/exp.c
@@ -5,6 +5,7 @@
* SPDX-License-Identifier: MIT
*/
+#include <float.h>
#include <math.h>
#include <stdint.h>
#include "math_config.h"
@@ -169,4 +170,7 @@ __exp_dd (double x, double xtail)
strong_alias (exp, __exp_finite)
hidden_alias (exp, __ieee754_exp)
hidden_alias (__exp_dd, __exp1)
+# if LDBL_MANT_DIG == 53
+long double expl (long double x) { return exp (x); }
+# endif
#endif