Introduction
I found this question that was closed because it was unclear, yet it was a nice idea. I'll do my best to make this into a clear challenge.
The Riemann Zeta function is a special function that is defined as the analytical continuation of
to the complex plane. There are many equivalent formulas for it which makes it interesting for code golf.
Challenge
Write a program that takes 2 floats as input (the real and imaginary part of a complex number) and evaluates the Riemann Zeta function at that point.
Rules
- Input and output via console OR function input and return value
- Built in complex numbers are not allowed, use floats (number, double, ...)
- No mathematical functions except
+ - * / pow log
and real valued trig functions (if you want to integrate, use the gamma function, ... you must include this functions definition in the code) - Input: 2 floats
- Output: 2 floats
- Your code must contain value that gives theoretically arbitrary precision when made arbitrary large/small
- The behaviour at input 1 is not important (this is the only pole of this function)
Shortest code in bytes wins!
Example Input and Output
Input:
2, 0
Output:
1.6449340668482266, 0
Input:
1, 1
Output:
0.5821580597520037, -0.9268485643308071
Input:
-1, 0
Output:
-0.08333333333333559, 0
eps
and inputx
there exists anN
which calculateszeta(x)
to withineps
; or must there exist anN
which depends only oneps
and guarantees that for anyx
(or perhaps for anyx
more than a given function ofeps
from the pole) it achieves the bound; or mayN
depend onx
, but answers should explain how to calculateN
givenx
andeps
? (My analytical number theory isn't up to much, but I suspect that options 2 and 3 are going to be beyond all but one or two regular posters). \$\endgroup\$x
and for anyeps
there must exist aP
such that for allN>P
the output is closer thaneps
to the exact value. Is this clear? Do I need to clarify it for the case with N small enough? \$\endgroup\$