circuitpython/lib/libm
Jeff Epler d3fb6c96da libm: ef_rem_pio2.c: Save ROM-tables at the expense of speed
This function computes the remainder of a value `x` modulo pi/2, to high
precision.

It does this by dividing the flotaing point values into several ranges
by magnitude, and applies successively slower but more accurate algorithms.

The last two steps, one covering values up to around 2^7 * pi/2
(called "medium size") and a final one covering all possible float values,
require big tables.

By eliminating the "medium size" case, a table and some code are removed
from the binary.  This makes some cases take longer, but saves hundreds
of bytes.  It does _NOT_ affect the result, only the speed.

```
[desktop python]
>>> sum(math.sin(2.**i) for i in range(21))
1.4206898748939305

[trinket m0, before change to ef_rem_pio2.c]
>>> sum(math.sin(2.**i) for i in range(21))
1.42069

[trinket m0, after change to ef_rem_pio2.c]
>>> sum(math.sin(2.**i) for i in range(21))
1.42069
```
2020-08-04 14:45:45 -05:00
..
acoshf.c lib/libm: Add acosh, asinh, atanh, tan; get working with stmhal. 2014-12-18 14:44:02 +00:00
asinfacosf.c py and libm: Add asinf,acosf; print higher precision for float. 2014-09-11 22:24:45 +01:00
asinhf.c lib/libm: Add acosh, asinh, atanh, tan; get working with stmhal. 2014-12-18 14:44:02 +00:00
atan2f.c lib: Add lib and libm, moving current files from stmhal. 2014-08-29 22:42:26 +01:00
atanf.c lib: Add lib and libm, moving current files from stmhal. 2014-08-29 22:42:26 +01:00
atanhf.c lib/libm: Add acosh, asinh, atanh, tan; get working with stmhal. 2014-12-18 14:44:02 +00:00
ef_rem_pio2.c libm: ef_rem_pio2.c: Save ROM-tables at the expense of speed 2020-08-04 14:45:45 -05:00
ef_sqrt.c Fix up end of file and trailing whitespace. 2020-06-03 10:56:35 +01:00
erf_lgamma.c Fix up end of file and trailing whitespace. 2020-06-03 10:56:35 +01:00
fdlibm.h Fix up end of file and trailing whitespace. 2020-06-03 10:56:35 +01:00
fmodf.c py: Implement divmod, % and proper // for floating point. 2014-09-13 18:43:09 +01:00
kf_cos.c Fix up end of file and trailing whitespace. 2020-06-03 10:56:35 +01:00
kf_rem_pio2.c Fix up end of file and trailing whitespace. 2020-06-03 10:56:35 +01:00
kf_sin.c Fix up end of file and trailing whitespace. 2020-06-03 10:56:35 +01:00
kf_tan.c Fix up end of file and trailing whitespace. 2020-06-03 10:56:35 +01:00
libm.h lib/libm: Add acosh, asinh, atanh, tan; get working with stmhal. 2014-12-18 14:44:02 +00:00
log1pf.c libm: Disable float-equal diagnostics 2020-02-27 08:30:12 -06:00
math.c Add license to some obvious files. 2020-07-06 19:16:25 +01:00
nearbyintf.c merge from 2.2.0 + fix up board defs 2018-01-02 21:25:41 -05:00
roundf.c py: Add builtin round function. 2014-10-31 11:28:50 +00:00
sf_cos.c Fix up end of file and trailing whitespace. 2020-06-03 10:56:35 +01:00
sf_erf.c Fix up end of file and trailing whitespace. 2020-06-03 10:56:35 +01:00
sf_frexp.c Fix up end of file and trailing whitespace. 2020-06-03 10:56:35 +01:00
sf_ldexp.c Fix up end of file and trailing whitespace. 2020-06-03 10:56:35 +01:00
sf_modf.c Fix up end of file and trailing whitespace. 2020-06-03 10:56:35 +01:00
sf_sin.c Fix up end of file and trailing whitespace. 2020-06-03 10:56:35 +01:00
sf_tan.c Fix up end of file and trailing whitespace. 2020-06-03 10:56:35 +01:00
thumb_vfp_sqrtf.c lib/libm: Move Thumb-specific sqrtf function to separate file. 2016-11-03 12:26:32 +11:00
wf_lgamma.c Fix up end of file and trailing whitespace. 2020-06-03 10:56:35 +01:00
wf_tgamma.c all: Use the name MicroPython consistently in comments 2017-07-31 18:35:40 +10:00