Performance fixes relating to floating point: erf and erfc

erf and erfc are missing float versions, so I import them from
openlibm. erf is used from Poincare::NormalDistribution::
StandardNormalCumulativeDistributiveFunctionAtAbscissa<float>, and erfc
is used (?) just from MicroPython.

To clarify, if there is no float version of a function like erf, but
there is a double version, C++ promotes the possible float parameter to
double and soft-float hilarity ensues.
This commit is contained in:
Neven Sajko
2020-02-24 21:04:23 +00:00
committed by LeaNumworks
parent c0c73accef
commit 201ecaef5b
3 changed files with 188 additions and 0 deletions

View File

@@ -114,6 +114,8 @@ inline constexpr float ceil(float x) { return __builtin_ceilf(x); }
inline constexpr float copysign(float x, float y) { return __builtin_copysignf(x, y); }
inline constexpr float cos(float x) { return __builtin_cosf(x); }
inline constexpr float cosh(float x) { return __builtin_coshf(x); }
inline constexpr float erf(float x) { return __builtin_erff(x); }
inline constexpr float erfc(float x) { return __builtin_erfcf(x); }
inline constexpr float exp(float x) { return __builtin_expf(x); }
inline constexpr float expm1(float x) { return __builtin_expm1f(x); }
inline constexpr float fabs(float x) { return __builtin_fabsf(x); }