Arbitrary-precision fixed-point library for Python
Project description
pyfixed
pyfixed is an arbitrary-precision fixed-point arithmetics library for Python.
It currently is in early development.
pyfixed is licensed under the MIT License.
Rational
pyfixed aims to aid in simulation of fixed-point arithmetics and testing of software and hardware solutions.
It supports multiple configurations, with the goal of supporting a wide variety of hardware implementations.
pyfixed is currently not optimized, and has poor real-time performance.
While optimizations are planned in general, the project does not aim to achieve any performance goals.
Installation
Install latest:
pip3 install pyfixed
Build from source:
python -m build
pip3 install dist/*.whl
You can also use it directly by adding the root directory to your PYTHONPATH.
Features
pyfixed.Fixed: arbitrary-precision fixed-point.- Native API.
- Simple arithmetic and bitwise operations.
- 10 rounding modes (see
pyfixed.Fixed.FixedRounding). - Optional exceptions on overflow, underflow and invalid operations (e.g. divide by 0).
- Sticky exception flags.
- Support for Python, NumPy and mpmath numeric types (integers and floats).
pyfixed.Complex: arbitrary-precision complex fixed-point.fixed_cmp: visual comparison between fixed-point, IEEE-754 and posits.
Planned Features
- Posit support (against
softposit). - More functions:
- $e^z$, $ln(z)$ and their derivatives.
- FFT.
- Matrix operations.
- Other DSP-related operations.
Project details
Release history Release notifications | RSS feed
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 pyfixed-0.3.0.tar.gz.
File metadata
- Download URL: pyfixed-0.3.0.tar.gz
- Upload date:
- Size: 61.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
377a5a8791e77ec14a7bbaa79873745e46a21736e593ceeca96a2ddbbba76cd1
|
|
| MD5 |
99bef0fa26aa8b056bdff2a86ef331c9
|
|
| BLAKE2b-256 |
35fb8f7f1c98ff2a491eb69a8392b5c5ca3d523668b429f1bf30b7b60a2c56a7
|
File details
Details for the file pyfixed-0.3.0-py3-none-any.whl.
File metadata
- Download URL: pyfixed-0.3.0-py3-none-any.whl
- Upload date:
- Size: 41.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a921de1a2b514826d9ea82071aa823403ad04e4be1220e9af25506bb40d825db
|
|
| MD5 |
2db6c5f25fdbf440f4d99a67f3b0dd8c
|
|
| BLAKE2b-256 |
7e75417c3e6f78083c08ac6971d5efe0bf5e162178556f045e9a0f334be35ec8
|