PyMPF
This is an arbitrary precision IEEE-754 floating point implementation.
The main motivation is correctness and test-case generation, so a number of things might seem a bit strange. This library has a bunch of limitations and should never be used if you want things to be fast. MPFR, SoftFloat, or SymFPU is what you want.
Why "yet another" implementation?
- This library supports RNA (MPFR does not)
- This library supports subnormals and infinities (MPFR does, but only with tricks)
- This library uses IEEE or SMTLIB terminology where possible (MPFR tends to stick to more "maths" terminology)
- This library is implemented completely in Python unlike gmpy, mpmath, etc.
- This library is an independent implementation so can be used to check Z3/SymFPU
- This library uses a stupid but simple algorithm to do rounding
The main use of this library is random test-case generation for SMT-LIB. It has been used to validate the FP implementations of CVC4, CVC5, Z3, MathSAT, BitWuzla, SONOLAR, Alt-Ergo, Colibri, goSAT, and xsat; and has found bugs in all of them ;)
SMT-LIB random testcase generator
See https://github.com/florianschanda/smtlib_schanda
Requirements
Python 3.8 or later.
Documentation
This is very much work in progress and entirely incomplete (I just started adding this).
Installation
This package is available on PyPI. To install simply run:
$ pip3 install PyMPF
License and Copyright
Everything in this repository is licensed under the GNU GPL v3.
Key copyright holders that contributed to this library are:
- Florian Schanda
- Altran UK Limited
- Zenuity AB
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pympf-1.0.5.tar.gz.
File metadata
- Download URL: pympf-1.0.5.tar.gz
- Upload date:
- Size: 30.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fdca47bbdedad4e28079f072b9caea461f870af25a10bf6532f6a61481d11eab
|
|
| MD5 |
e79b06de2e6f4467183e94e6a226f5d2
|
|
| BLAKE2b-256 |
092f9d4727192e5d6e187b086f51d8e9c79855a5d01a0b9954e405cc848289c7
|
File details
Details for the file pympf-1.0.5-py3-none-any.whl.
File metadata
- Download URL: pympf-1.0.5-py3-none-any.whl
- Upload date:
- Size: 32.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6355318d61f2c63e3242c49ffa829d6047dd72927b9a4c1213a6c26502fcd74e
|
|
| MD5 |
13d6013a8ed57b56a373677ad9ab515f
|
|
| BLAKE2b-256 |
28db1d4a50c40568411b6974efd3bd5411af6df84b040d7365ce3ba15e2173d7
|