Skip to content
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

Precision issues #2

Closed
francescotaurone opened this issue Sep 13, 2022 · 1 comment
Closed

Precision issues #2

francescotaurone opened this issue Sep 13, 2022 · 1 comment

Comments

@francescotaurone
Copy link

If you choose Quadruple precision, the mantissa portion of the number gets approximated after a certain number of bits.

As an example, the results for Quadruple precision from this converter (https://babbage.cs.qc.cuny.edu/IEEE-754/) are different from the one using the IEEE754 class.

Digging a bit in the methods, the approximation is related to the fact that building the mantissa multiplying by 2 makes the error due to the initial approximation of the floating point number larger and larger, until it affects the result of the mantissa computation.

I read that python and numpy do not handle particularly well high precision real numbers.

I had to employ gmpy2 for my needs, maybe it's worth having a look at it for future modifications to the class.

@canbula
Copy link
Owner

canbula commented Nov 14, 2023

This issue is fixed with version 0.4, thanks for the feedback.
https://github.com/canbula/ieee754/releases/tag/v_04

@canbula canbula closed this as completed Nov 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants