-
Notifications
You must be signed in to change notification settings - Fork 11
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
Incorrect sqrt result (is there a maximal precision?) #112
Comments
Thanks for the report. I confirm that I see the same results as you. I think what you're seeing is due to the default context having an EDIT: |
It's possible that we want to change the way that the context treats |
Marking as a bug: the code is technically behaving as intended, but that behaviour is surprising; I think this is a design bug that we should try and fix. |
I can confirm that And yes, that result is surprising. |
The following code will print about 21'000 digits (which is what you expect given precision 70'000 and given that one decimal digits is about 3.3 binary digits).
However, from those digits only about the first 5'000 digits are correct. And the last 5'000 digits are all zeros.
Increasing the precision will not change the result, it will just add more zeros at the end.
This clearly looks like a bug to me. I wrote the same thing in C++ (using MPFR C++), and there I get the correct digits. The first 20'000 of them are correct (comparing to https://oeis.org/A002193/b002193.txt).
The text was updated successfully, but these errors were encountered: