<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/lib/libm/ef_rem_pio2.c, branch 6.0.x</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=6.0.x</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=6.0.x'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2020-08-04T19:45:45+00:00</updated>
<entry>
<title>libm: rem_pio2: Reduce size of static array</title>
<updated>2020-08-04T19:45:45+00:00</updated>
<author>
<name>Jeff Epler</name>
<email>jepler@gmail.com</email>
</author>
<published>2020-08-04T18:12:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=c0b32976e8bff4a04cd4f172535e3b153143b417'/>
<id>urn:sha1:c0b32976e8bff4a04cd4f172535e3b153143b417</id>
<content type='text'>
This array was of 32-bit values, but the entries were only ever
in the 0-255 range.  Convert to uint8_t.

Testing performed: The result of the sum-of-sin was unchanged
&gt;&gt;&gt; import math; sum(math.sin(2.**i) for i in range(21))
1.42069
</content>
</entry>
<entry>
<title>libm: ef_rem_pio2.c: Save ROM-tables at the expense of speed</title>
<updated>2020-08-04T19:45:45+00:00</updated>
<author>
<name>Jeff Epler</name>
<email>jepler@gmail.com</email>
</author>
<published>2020-08-04T18:06:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=d3fb6c96da9dc38ea24a221e11f05cdbbddb34c9'/>
<id>urn:sha1:d3fb6c96da9dc38ea24a221e11f05cdbbddb34c9</id>
<content type='text'>
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]
&gt;&gt;&gt; sum(math.sin(2.**i) for i in range(21))
1.4206898748939305

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

[trinket m0, after change to ef_rem_pio2.c]
&gt;&gt;&gt; sum(math.sin(2.**i) for i in range(21))
1.42069
```
</content>
</entry>
<entry>
<title>Fix up end of file and trailing whitespace.</title>
<updated>2020-06-03T09:56:35+00:00</updated>
<author>
<name>Diego Elio Pettenò</name>
<email>flameeyes@flameeyes.com</email>
</author>
<published>2020-05-30T09:44:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=dd5d7c86d22807c021dd1711eb7dd3daebc5cfcf'/>
<id>urn:sha1:dd5d7c86d22807c021dd1711eb7dd3daebc5cfcf</id>
<content type='text'>
This can be enforced by pre-commit, but correct it separately to make it easier to review.
</content>
</entry>
<entry>
<title>Merge 2.1.0 changes into master.</title>
<updated>2017-10-23T22:26:36+00:00</updated>
<author>
<name>Dan Halbert</name>
<email>halbert@halwitz.org</email>
</author>
<published>2017-10-23T16:29:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=6df99b5d0e0f406b6b3e8bd220d1129225b9c2ae'/>
<id>urn:sha1:6df99b5d0e0f406b6b3e8bd220d1129225b9c2ae</id>
<content type='text'>
</content>
</entry>
<entry>
<title>all: Use the name MicroPython consistently in comments</title>
<updated>2017-07-31T08:35:40+00:00</updated>
<author>
<name>Alexander Steffen</name>
<email>devel.20.webmeister@spamgourmet.com</email>
</author>
<published>2017-06-30T07:22:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=55f33240f3d7051d4213629e92437a36f1fac50e'/>
<id>urn:sha1:55f33240f3d7051d4213629e92437a36f1fac50e</id>
<content type='text'>
There were several different spellings of MicroPython present in comments,
when there should be only one.
</content>
</entry>
<entry>
<title>lib/libm: Add acosh, asinh, atanh, tan; get working with stmhal.</title>
<updated>2014-12-18T14:44:02+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2014-12-18T14:44:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=f04329e93b7bfa5462f232832d64aac3dc52d5db'/>
<id>urn:sha1:f04329e93b7bfa5462f232832d64aac3dc52d5db</id>
<content type='text'>
acoshf, asinhf, atanhf were added from musl.  mathsincos.c was
split up into its original, separate files (from newlibe-nano-2).
tan was added.

All of the important missing float functions are now implemented,
and pyboard now passes tests/float/math_fun.py (finally!).
</content>
</entry>
</feed>
