<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/tests/basics/int_big_div.py, branch main</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=main</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2016-05-08T20:38:43+00:00</updated>
<entry>
<title>py/mpz: Fix bug with overflowing C-shift in division routine.</title>
<updated>2016-05-08T20:38:43+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-05-08T20:38:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=dc3faea0405dea803828f5a2be314734b8c166b6'/>
<id>urn:sha1:dc3faea0405dea803828f5a2be314734b8c166b6</id>
<content type='text'>
When DIG_SIZE=32, a uint32_t is used to store limbs, and no normalisation
is needed because the MSB is already set, then there will be left and
right shifts (in C) by 32 of a 32-bit variable, leading to undefined
behaviour.  This patch fixes this bug.
</content>
</entry>
<entry>
<title>py: Make mpz able to use 16 bits per digit; and 32 on 64-bit arch.</title>
<updated>2014-09-06T16:15:34+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2014-09-06T16:15:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=9a21d2e070c9ee0ef2c003f3a668e635c6ae4401'/>
<id>urn:sha1:9a21d2e070c9ee0ef2c003f3a668e635c6ae4401</id>
<content type='text'>
Previously, mpz was restricted to using at most 15 bits in each digit,
where a digit was a uint16_t.

With this patch, mpz can use all 16 bits in the uint16_t (improvement
to mpn_div was required).  This gives small inprovements in speed and
RAM usage.  It also yields savings in ROM code size because all of the
digit masking operations become no-ops.

Also, mpz can now use a uint32_t as the digit type, and hence use 32
bits per digit.  This will give decent improvements in mpz speed on
64-bit machines.

Test for big integer division added.
</content>
</entry>
</feed>
