Commit Graph

10 Commits

Author SHA1 Message Date
Arthur Camouseigt
1995781a9f [Poincare/IEEE754] Changed methods to use std function
Implemented std::nextafter to replace hand made one.
Methods next and previous are no longer making the difference between -0
and +0

Change-Id: I42e1a073623b70656d9df954694803840cf3088c
2020-11-04 15:30:53 +01:00
Neven Sajko
201ecaef5b 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.
2020-04-09 13:58:56 +02:00
Neven Sajko
bdc5be94b6 Performance fixes relating to floating point
Removes unneccesary usage of soft-float double usage. The reason for the
useless double math being done were broken standard C++ functions:
atanh<float>, sqrt<float>, asinh<float>, operator/<float>. This was in
turn caused by missing float versions of C++ functions hypot, atan2,
logb, scalbn.

A logbf implementation was missing from the libm, so I added one from
openlibm.
2020-04-09 13:58:56 +02:00
Jacob Young
a8783fe21f Remove a duplicate function, cleanup sorting and use consistent argument names in math.h.
Add missing math.h tests and make each test a single line for easier comparison with math.h.
Add missing cmath undefs and functions and use constexpr instead of static.
2020-03-16 15:00:40 +01:00
Émilie Feral
77047a173b [liba] define fmod 2018-07-18 17:09:07 +02:00
Émilie Feral
e7619633bd [liba] Add fmax in math.h header 2018-07-18 16:32:49 +02:00
Émilie Feral
2a05247629 [liba] Add hypot in math.h header 2018-07-18 16:32:49 +02:00
Émilie Feral
253a9de5fb [libaxx] Add std::erf in cmath 2018-01-04 15:48:06 +01:00
Jacob Young
da1e66e798 Fix #115 by fixing the math.h and cmath includes. 2017-10-13 18:08:15 +02:00
Émilie Feral
1964d61fdc [libaxx] add cmath and use cmath instead of math.h when required
Change-Id: Id839b17d33c69e2e002f370e553ff35246a1bc90
2017-08-16 09:55:29 +02:00