- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Implement function Riemann Zeta #2975
Conversation
It is tough to say for sure. The formula above is a rough approximation of the number of summands needed to calculate the function. I think simply changing the "15" in that formula to use |
Hmm, I gave it a try but it doesn't magically result in the desired precision (also not with Complex numbers). |
You may have better luck using an alternative error bound. I have calculated |
The error bound for the formulation is |
Thanks for working out these formulas for the bounds. I did a bit of trial and error but no success yet. I tried the following for the value => 0.74 + 1.55 * (12 + 1) + 0.67 * Math.log(2 * Math.abs(value) + 1) + 1.06 * Math.abs(value) Help troubleshooting this would be very welcome. |
This is very strange indeed. When I tested it in python it seemed to work fine with all the precision. I suspect an issue with the |
I don't think that will make a difference since the number of digits is not a huge number nor does it need a lot of precision. |
Any other ideas to get the precision of the function under control? |
@gwhitney do you maybe have an idea on how to ensure the accuracy of this new If not, I propose we leave it as it is and add a comment in the docs that the function has a limited precision of about 6 digits. |
Sorry for the long delay, I was on vacation. I'm not sure why the precision is not working but I'll continue searching. For now we can just leave it at 6 digits of accuracy I think |
I've tried to extract the internal |
Published now in |
Based upon #2950
This PR:
@Bobingstern I'm working on refactoring your
zeta
implementation. Can you have a look at it to see if this approach makes sense?It is working out quite nicely, but I need your help on how to ensure the right precision. For complex numbers, there is a formula:
Do you know what formula we need to make sure the
number
andBigNumber
implementation have a precision that corresponds to the configuredconfig.epsilon
?