Metadata-Version: 2.4
Name: pyfixed
Version: 0.1.1
Summary: Arbitrary-precision fixed-point library for Python
Author: Shachar Kraus
License-Expression: MIT
Project-URL: Homepage, https://gitlab.com/ShacharKraus/pyfixed
Project-URL: Issues, https://gitlab.com/ShacharKraus/pyfixed/-/issues
Keywords: fixed,fixed point,fixed-point
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Framework :: Pytest
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Mathematics
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: matplotlib
Requires-Dist: mpmath
Requires-Dist: numpy
Requires-Dist: py
Requires-Dist: pytest
Requires-Dist: pytest-xdist
Requires-Dist: typing_extensions
Dynamic: license-file

# `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](./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

```bash
python -m build
pip3 install dist/pyfixed-version-py3-none-any.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).
  - Support for Python and NumPy numeric types (integers and floats).
- `fixed_cmp` - visual comparison between fixed-point, IEEE-754 and posits.

### Planned Features

- Documentation.
- Sticky overflow/underflow/undefined (instead of exceptions).
- Complex fixed-point.
- Posit support (against [`softposit`](https://pypi.org/project/softposit/)).
- More functions:
  - $e^z$, $ln(z)$ and their derivatives.
  - FFT.
  - Matrix operations.
  - Other DSP-related operations.

## [Further Documentation](./docs/) (TBD)
