Comparison

Comparison matrix

Fixed-point libraries

Library

APyTypes

en_cl_fix

fixedpoint

fpbinary

fxpmath

numfi

pyfixp

spfpm

Custom fixed-point formats

Yes

Yes

Yes

Yes

Yes

Yes [2]

Yes

Yes

Custom floating-point formats

Yes

No

No

No

No

No

No

No

Maximum wordlength [5]

None

53/None [1]

None

None

None

64 [2]

53 [3]

None

Resizing of fixed-point results

Yes

Yes

Yes

Yes

Yes

Yes [2]

Yes [3]

No

Arrays

Yes

Yes

No

No [4]

Yes

Yes

Yes [3]

No

Matrix multiplication (@)

Yes

No

N/A

N/A

No

No

Yes [3]

N/A

Written in

C++/Python

Python

Python

C/Python

Python

Python

Python [3]

Python

Footnotes

Floating-point libraries

Library

APyTypes

gmpy2

Custom fixed-point formats

Yes

No

Custom floating-point formats

Yes

Yes

Binary representation of number [6]

Yes

No

Maximum wordlength

32 bits for exponent, 64 bits for mantissa [7]

None

Stochastic rounding

Yes

No

Arrays

Yes

No

Matrix multiplication (@)

Yes

N/A

Written in

C++/Python

C/Python

Footnotes

Performance Comparison

This benchmark compares relevant fixed-point libraries from the list above. It is updated every documentation build and may vary over time as the code is further optimized.

Benchmark numbers for different fixed-point libraries. Benchmark relative to APyTypes for different fixed-point libraries.

Feature Comparison

Feature matrix for different fixed-point libraries.