<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/py/objfloat.c, branch v1.9.2</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=v1.9.2</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=v1.9.2'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2017-07-31T08:35:40+00:00</updated>
<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>py: Reduce str/repr precision of float numbers when floats are 30-bit.</title>
<updated>2017-04-21T06:21:56+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-04-19T08:46:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=7a72c0db5a6c2b1f0978516134a95bb6867706ef'/>
<id>urn:sha1:7a72c0db5a6c2b1f0978516134a95bb6867706ef</id>
<content type='text'>
With 30-bit floats there aren't enough bits to faithfully print 7 decimal
digits, so reduce the precision to 6 digits.
</content>
</entry>
<entry>
<title>py/objfloat: Add implementation of high-quality float hashing.</title>
<updated>2017-04-12T03:38:17+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-04-06T07:27:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=a73501b1d63e5240cbced95b884383b79f5d6efd'/>
<id>urn:sha1:a73501b1d63e5240cbced95b884383b79f5d6efd</id>
<content type='text'>
Disabled by default.
</content>
</entry>
<entry>
<title>py: Add very simple but correct hashing for float and complex numbers.</title>
<updated>2017-04-04T01:57:21+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-04-04T01:57:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=19f2e47d59b539f94a49137c379c88f0aed53cf1'/>
<id>urn:sha1:19f2e47d59b539f94a49137c379c88f0aed53cf1</id>
<content type='text'>
Hashing of float and complex numbers that are exact (real) integers should
return the same integer hash value as hashing the corresponding integer
value.  Eg hash(1), hash(1.0) and hash(1+0j) should all be the same (this
is how Python is specified: if x==y then hash(x)==hash(y)).

This patch implements the simplest way of doing float/complex hashing by
just converting the value to int and returning that value.
</content>
</entry>
<entry>
<title>py: Change mp_uint_t to size_t for mp_obj_str_get_data len arg.</title>
<updated>2017-03-29T01:56:45+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-03-25T08:48:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=6b341075376705ee1fe9e003b76b09afa59778f4'/>
<id>urn:sha1:6b341075376705ee1fe9e003b76b09afa59778f4</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py/objfloat: Raise ZeroDivisionError for 0 to negative power.</title>
<updated>2017-02-02T13:01:37+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-02-02T13:01:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=4b8ec5256d3d27b6cd69afeda62d645df4719ea9'/>
<id>urn:sha1:4b8ec5256d3d27b6cd69afeda62d645df4719ea9</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py: Use mp_raise_msg helper function where appropriate.</title>
<updated>2016-10-17T01:17:37+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-10-17T01:17:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=7d0d7215d2575a2d36d34c9a13b58cade0610a28'/>
<id>urn:sha1:7d0d7215d2575a2d36d34c9a13b58cade0610a28</id>
<content type='text'>
Saves the following number of bytes of code space: 176 for bare-arm, 352
for minimal, 272 for unix x86-64, 140 for stmhal, 120 for esp8266.
</content>
</entry>
<entry>
<title>py/objfloat, py/modmath: Ensure M_PI and M_E defined.</title>
<updated>2016-05-12T12:28:45+00:00</updated>
<author>
<name>Colin Hogben</name>
<email>colin@infinnovation.co.uk</email>
</author>
<published>2016-05-09T21:11:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=a896951a9a8d8585d094e5ee6d7d37ff17d1b73e'/>
<id>urn:sha1:a896951a9a8d8585d094e5ee6d7d37ff17d1b73e</id>
<content type='text'>
In some compliation enviroments (e.g. mbed online compiler) with
strict standards compliance, &lt;math.h&gt; does not define constants such
as M_PI.  Provide fallback definitions of M_E and M_PI where needed.
</content>
</entry>
<entry>
<title>py: Change first arg of type.make_new from mp_obj_t to mp_obj_type_t*.</title>
<updated>2016-01-11T00:49:27+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-01-03T15:55:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=5b3f0b7f39bd67cc9182993c288f09f67a0890df'/>
<id>urn:sha1:5b3f0b7f39bd67cc9182993c288f09f67a0890df</id>
<content type='text'>
The first argument to the type.make_new method is naturally a uPy type,
and all uses of this argument cast it directly to a pointer to a type
structure.  So it makes sense to just have it a pointer to a type from
the very beginning (and a const pointer at that).  This patch makes
such a change, and removes all unnecessary casting to/from mp_obj_t.
</content>
</entry>
<entry>
<title>py: Change type of .make_new and .call args: mp_uint_t becomes size_t.</title>
<updated>2016-01-11T00:48:41+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-01-03T09:59:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=a0c97814dfcb0debbde8be99539e3d5ca2334e54'/>
<id>urn:sha1:a0c97814dfcb0debbde8be99539e3d5ca2334e54</id>
<content type='text'>
This patch changes the type signature of .make_new and .call object method
slots to use size_t for n_args and n_kw (was mp_uint_t.  Makes code more
efficient when mp_uint_t is larger than a machine word.  Doesn't affect
ports when size_t and mp_uint_t have the same size.
</content>
</entry>
</feed>
