aboutsummaryrefslogtreecommitdiff
path: root/math/include
diff options
context:
space:
mode:
authorSzabolcs Nagy <szabolcs.nagy@arm.com>2019-08-09 15:18:40 +0100
committerSzabolcs Nagy <szabolcs.nagy@arm.com>2019-10-14 11:58:53 +0100
commitc280e49d7b1d1987e75de0e0e57a63ee7167ad5f (patch)
tree3912207cc2a61fb587ac32d912120645a56f9778 /math/include
parent7a1f4cfdecb2060158bff1c9428ed2bb5442cc6f (diff)
downloadarm-optimized-routines-c280e49d7b1d1987e75de0e0e57a63ee7167ad5f.tar.gz
Add vector logf
The polynomial was produced by searching the coefficient space using heuristics and ideas from https://arxiv.org/abs/1508.03211 The worst-case error is 3.34 ulp, subnormal range inputs and other special cases use scalar logf.
Diffstat (limited to 'math/include')
-rw-r--r--math/include/mathlib.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/math/include/mathlib.h b/math/include/mathlib.h
index 6d62610..bacd2b6 100644
--- a/math/include/mathlib.h
+++ b/math/include/mathlib.h
@@ -26,6 +26,7 @@ double pow (double, double);
/* Scalar functions using the vector algorithm with identical result. */
float __s_expf (float);
float __s_expf_1u (float);
+float __s_logf (float);
double __s_exp (double);
#if __aarch64__
@@ -42,6 +43,7 @@ typedef __attribute__((__neon_vector_type__(2))) double __f64x2_t;
/* Vector functions following the base PCS. */
__f32x4_t __v_expf (__f32x4_t);
__f32x4_t __v_expf_1u (__f32x4_t);
+__f32x4_t __v_logf (__f32x4_t);
__f64x2_t __v_exp (__f64x2_t);
#if __GNUC__ >= 9 || __clang_major__ >= 8
@@ -50,10 +52,12 @@ __f64x2_t __v_exp (__f64x2_t);
/* Vector functions following the vector PCS. */
__vpcs __f32x4_t __vn_expf (__f32x4_t);
__vpcs __f32x4_t __vn_expf_1u (__f32x4_t);
+__vpcs __f32x4_t __vn_logf (__f32x4_t);
__vpcs __f64x2_t __vn_exp (__f64x2_t);
/* Vector functions following the vector PCS using ABI names. */
__vpcs __f32x4_t _ZGVnN4v_expf (__f32x4_t);
+__vpcs __f32x4_t _ZGVnN4v_logf (__f32x4_t);
__vpcs __f64x2_t _ZGVnN2v_exp (__f64x2_t);
#endif
#endif