-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrapping and Bias issues #44
Comments
Hello @desvdp I'm going to answer point by point while I review them. 1In this case: b = Fxp(20.5, False, n_word=4, scaling=1, bias=8)
fxpmath should define You can check this doing: b = Fxp(20.5, False, n_word=4, n_frac=1, scaling=1, bias=8)
|
2In this case zero = Fxp(0.0, False, n_word=5, overflow='wrap', scaling=1, bias=8)
The behavior is similar what explained in the previous reply. As 0.0 is outside the range, fxpmath choose If you force zero = Fxp(0.0, False, n_word=5, n_frac=1, overflow='wrap', scaling=1, bias=8)
The result is ok. zero.info(verbose=3)
The info is not ok in values of |
3Crossing the portal to the "beyond 64 bits" always have surprises with Numpy. I've already reproduced the error and found the way to fix. So, in the next release will be included. By the way, I think more bugs are hide in scaling methods, even more using more than 64 bits, I guess. fxpmath is poorly tested in scaled arithmetic. Thanks for your revision. |
Closing the issue because version 0.4.4 should solve it! |
Hi Franco,
thanks for fixing the previous issues so quickly! Looking a bit closer, I did find some extra:
(1) Bias and scaling don't seem to play very wel with wrapping/saturation:
(2) There seems to be an issue with zero values:
Saturation does deal with it:
(3) Last but not least, some long values still throw an error:
b= Fxp(0,False,64,0,overflow='wrap', bias = 8)
Let me know if you need further help testing ...
Thanks !
The text was updated successfully, but these errors were encountered: