-
Notifications
You must be signed in to change notification settings - Fork 1
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
Library does not work with more than 38 digits. #10
Comments
I would like to use this library with 200 digits, 100 before the decimal point and 100 after. That would be equivalent to 1E99 to 1E-99 and allows me to use it for calculators with that range of numbers. At the moment it doesn't work above 38 digits, and there is a comment to that effect in the code. |
Have a look at bcd.h at lines 52-56. There are two constants that control this behaviour: |
Hello, I have done this and unfortunately the code crashes. I have ported the code to the RP Pico and above 38 digits I get an error that I don't understand yet. I also expected it to work for any number of digits. The comment that mentions a rash is actually one that I put in the code. the problem is in DividePositive but isn't a divide by zero. I think it's some form of overflow of the digits outside the mdata array bounds. Maybe. |
Hello blackjetrock, The proof of the pudding is in the eating. Besides the bcdLength the following changes were made
All unit tests of bcd200 run in the green! Have fun! |
No description provided.
The text was updated successfully, but these errors were encountered: