Wykres commitów

7 Commity (e520fa2e0fb3cfafe27a1f9e7e9b230dd58d7a33)

Autor SHA1 Wiadomość Data
Matthias Urlichs e520fa2e0f py/binary: Support half-float 'e' format in struct pack/unpack.
This commit implements the 'e' half-float format: 10-bit mantissa, 5-bit
exponent.  It uses native _Float16 if supported by the compiler, otherwise
uses custom bitshifting encoding/decoding routines.

Signed-off-by: Matthias Urlichs <matthias@urlichs.de>
Signed-off-by: Damien George <damien@micropython.org>
2024-03-20 14:13:49 +11:00
Jim Mussared 4216bc7d13 tests: Replace umodule with module everywhere.
This work was funded through GitHub Sponsors.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-06-08 17:54:24 +10:00
David Lechner 3dc324d3f1 tests: Format all Python code with black, except tests in basics subdir.
This adds the Python files in the tests/ directory to be formatted with
./tools/codeformat.py.  The basics/ subdirectory is excluded for now so we
aren't changing too much at once.

In a few places `# fmt: off`/`# fmt: on` was used where the code had
special formatting for readability or where the test was actually testing
the specific formatting.
2020-03-30 13:21:58 +11:00
Damien George fde54350a8 tests/float: Convert "sys.exit()" to "raise SystemExit".
The latter is shorter and simpler because it doesn't require importing the
sys module.
2017-06-08 14:00:57 +10:00
Paul Sokolovsky a0cbc108ba tests/float: Make various tests skippable. 2017-03-09 00:11:05 +01:00
Paul Sokolovsky 3d3ef36e97 modstruct: Rename module to "ustruct", to allow full Python-level impl. 2015-05-04 16:53:52 +03:00
David Steinberg 0b3014ce3a py: Add support for floats in mp_binary_{get,set}_val()
- This then provides support for floats in the struct package
2015-01-27 22:49:01 +02:00