(FPCore (t)
:precision binary64
(-
1.0
(/
1.0
(+
2.0
(*
(- 2.0 (/ (/ 2.0 t) (+ 1.0 (/ 1.0 t))))
(- 2.0 (/ (/ 2.0 t) (+ 1.0 (/ 1.0 t)))))))))(FPCore (t) :precision binary64 (- 1.0 (/ 1.0 (+ 2.0 (* 1.0 (pow (- 2.0 (/ (/ 2.0 t) (+ 1.0 (/ 1.0 t)))) 2.0))))))
double code(double t) {
return 1.0 - (1.0 / (2.0 + ((2.0 - ((2.0 / t) / (1.0 + (1.0 / t)))) * (2.0 - ((2.0 / t) / (1.0 + (1.0 / t)))))));
}
double code(double t) {
return 1.0 - (1.0 / (2.0 + (1.0 * pow((2.0 - ((2.0 / t) / (1.0 + (1.0 / t)))), 2.0))));
}
real(8) function code(t)
real(8), intent (in) :: t
code = 1.0d0 - (1.0d0 / (2.0d0 + ((2.0d0 - ((2.0d0 / t) / (1.0d0 + (1.0d0 / t)))) * (2.0d0 - ((2.0d0 / t) / (1.0d0 + (1.0d0 / t)))))))
end function
real(8) function code(t)
real(8), intent (in) :: t
code = 1.0d0 - (1.0d0 / (2.0d0 + (1.0d0 * ((2.0d0 - ((2.0d0 / t) / (1.0d0 + (1.0d0 / t)))) ** 2.0d0))))
end function
public static double code(double t) {
return 1.0 - (1.0 / (2.0 + ((2.0 - ((2.0 / t) / (1.0 + (1.0 / t)))) * (2.0 - ((2.0 / t) / (1.0 + (1.0 / t)))))));
}
public static double code(double t) {
return 1.0 - (1.0 / (2.0 + (1.0 * Math.pow((2.0 - ((2.0 / t) / (1.0 + (1.0 / t)))), 2.0))));
}
def code(t): return 1.0 - (1.0 / (2.0 + ((2.0 - ((2.0 / t) / (1.0 + (1.0 / t)))) * (2.0 - ((2.0 / t) / (1.0 + (1.0 / t)))))))
def code(t): return 1.0 - (1.0 / (2.0 + (1.0 * math.pow((2.0 - ((2.0 / t) / (1.0 + (1.0 / t)))), 2.0))))
function code(t) return Float64(1.0 - Float64(1.0 / Float64(2.0 + Float64(Float64(2.0 - Float64(Float64(2.0 / t) / Float64(1.0 + Float64(1.0 / t)))) * Float64(2.0 - Float64(Float64(2.0 / t) / Float64(1.0 + Float64(1.0 / t)))))))) end
function code(t) return Float64(1.0 - Float64(1.0 / Float64(2.0 + Float64(1.0 * (Float64(2.0 - Float64(Float64(2.0 / t) / Float64(1.0 + Float64(1.0 / t)))) ^ 2.0))))) end
function tmp = code(t) tmp = 1.0 - (1.0 / (2.0 + ((2.0 - ((2.0 / t) / (1.0 + (1.0 / t)))) * (2.0 - ((2.0 / t) / (1.0 + (1.0 / t))))))); end
function tmp = code(t) tmp = 1.0 - (1.0 / (2.0 + (1.0 * ((2.0 - ((2.0 / t) / (1.0 + (1.0 / t)))) ^ 2.0)))); end
code[t_] := N[(1.0 - N[(1.0 / N[(2.0 + N[(N[(2.0 - N[(N[(2.0 / t), $MachinePrecision] / N[(1.0 + N[(1.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 - N[(N[(2.0 / t), $MachinePrecision] / N[(1.0 + N[(1.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
code[t_] := N[(1.0 - N[(1.0 / N[(2.0 + N[(1.0 * N[Power[N[(2.0 - N[(N[(2.0 / t), $MachinePrecision] / N[(1.0 + N[(1.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
1 - \frac{1}{2 + \left(2 - \frac{\frac{2}{t}}{1 + \frac{1}{t}}\right) \cdot \left(2 - \frac{\frac{2}{t}}{1 + \frac{1}{t}}\right)}
1 - \frac{1}{2 + 1 \cdot {\left(2 - \frac{\frac{2}{t}}{1 + \frac{1}{t}}\right)}^{2}}



Bits error versus t
Results
Initial program 0.0
Applied egg-rr0.0
Applied egg-rr0.0
Final simplification0.0
herbie shell --seed 2022152
(FPCore (t)
:name "Kahan p13 Example 3"
:precision binary64
(- 1.0 (/ 1.0 (+ 2.0 (* (- 2.0 (/ (/ 2.0 t) (+ 1.0 (/ 1.0 t)))) (- 2.0 (/ (/ 2.0 t) (+ 1.0 (/ 1.0 t)))))))))