I wanted to create a variable in Fxpmath with the following command:
Var2 = Fxp(6721.35595703125, True, 75, 13, overflow='wrap')
But this only creates an error in the wrap-function of Fxpmath
File "██████████PythonPython311Libsite-packagesfxpmathutils.py", line 352, in wrap
x = np.array(x).astype(dtype) & (m - 1)
~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
TypeError: unsupported operand type(s) for &: 'float' and 'int'
Setting the number of bits to use from 75 to something below 32 seems to fix the issue.
But i would like to use the original number of bits, as i am comparing different modules.
So does Fxpmath just not support numbers using more than 32 bits, or is there a solution?
Zylon is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.