When writing a method in java, I noticed that these two functions return the same value.
// Riemann-Siegel theta function using the approximation by the Stirling series
public static double theta (double t) {
return (t/2.0 * StrictMath.log(t/2.0/StrictMath.PI) - t/2.0
- StrictMath.PI/8.0 + 1.0/48.0/t + 7.0/5760.0/t/t/t);
}
// Riemann-Siegel theta function using the approximation by the Stirling series
public static double theta2 (double t) {
return (t/2.0 * Math.log(t/(2.0*Math.PI)) - t/2.0
- Math.PI/8.0 + 1.0/(48.0*Math.pow(t, 1)) + 7.0/(5760*Math.pow(t, 3)));
}
What is
7.0/5760.0/t/t/t
doing? Why is this the same as 7.0/(5760*t^3)?