(FPCore (t) :precision binary64 (/ (+ 1.0 (* (/ (* 2.0 t) (+ 1.0 t)) (/ (* 2.0 t) (+ 1.0 t)))) (+ 2.0 (* (/ (* 2.0 t) (+ 1.0 t)) (/ (* 2.0 t) (+ 1.0 t))))))
(FPCore (t) :precision binary64 (let* ((t_1 (/ (* 2.0 t) (+ 1.0 t)))) (/ (+ 1.0 (log (exp (pow t_1 2.0)))) (+ 2.0 (* t_1 t_1)))))
double code(double t) {
return (1.0 + (((2.0 * t) / (1.0 + t)) * ((2.0 * t) / (1.0 + t)))) / (2.0 + (((2.0 * t) / (1.0 + t)) * ((2.0 * t) / (1.0 + t))));
}
double code(double t) {
double t_1 = (2.0 * t) / (1.0 + t);
return (1.0 + log(exp(pow(t_1, 2.0)))) / (2.0 + (t_1 * t_1));
}
real(8) function code(t)
real(8), intent (in) :: t
code = (1.0d0 + (((2.0d0 * t) / (1.0d0 + t)) * ((2.0d0 * t) / (1.0d0 + t)))) / (2.0d0 + (((2.0d0 * t) / (1.0d0 + t)) * ((2.0d0 * t) / (1.0d0 + t))))
end function
real(8) function code(t)
real(8), intent (in) :: t
real(8) :: t_1
t_1 = (2.0d0 * t) / (1.0d0 + t)
code = (1.0d0 + log(exp((t_1 ** 2.0d0)))) / (2.0d0 + (t_1 * t_1))
end function
public static double code(double t) {
return (1.0 + (((2.0 * t) / (1.0 + t)) * ((2.0 * t) / (1.0 + t)))) / (2.0 + (((2.0 * t) / (1.0 + t)) * ((2.0 * t) / (1.0 + t))));
}
public static double code(double t) {
double t_1 = (2.0 * t) / (1.0 + t);
return (1.0 + Math.log(Math.exp(Math.pow(t_1, 2.0)))) / (2.0 + (t_1 * t_1));
}
def code(t): return (1.0 + (((2.0 * t) / (1.0 + t)) * ((2.0 * t) / (1.0 + t)))) / (2.0 + (((2.0 * t) / (1.0 + t)) * ((2.0 * t) / (1.0 + t))))
def code(t): t_1 = (2.0 * t) / (1.0 + t) return (1.0 + math.log(math.exp(math.pow(t_1, 2.0)))) / (2.0 + (t_1 * t_1))
function code(t) return Float64(Float64(1.0 + Float64(Float64(Float64(2.0 * t) / Float64(1.0 + t)) * Float64(Float64(2.0 * t) / Float64(1.0 + t)))) / Float64(2.0 + Float64(Float64(Float64(2.0 * t) / Float64(1.0 + t)) * Float64(Float64(2.0 * t) / Float64(1.0 + t))))) end
function code(t) t_1 = Float64(Float64(2.0 * t) / Float64(1.0 + t)) return Float64(Float64(1.0 + log(exp((t_1 ^ 2.0)))) / Float64(2.0 + Float64(t_1 * t_1))) end
function tmp = code(t) tmp = (1.0 + (((2.0 * t) / (1.0 + t)) * ((2.0 * t) / (1.0 + t)))) / (2.0 + (((2.0 * t) / (1.0 + t)) * ((2.0 * t) / (1.0 + t)))); end
function tmp = code(t) t_1 = (2.0 * t) / (1.0 + t); tmp = (1.0 + log(exp((t_1 ^ 2.0)))) / (2.0 + (t_1 * t_1)); end
code[t_] := N[(N[(1.0 + N[(N[(N[(2.0 * t), $MachinePrecision] / N[(1.0 + t), $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 * t), $MachinePrecision] / N[(1.0 + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(2.0 + N[(N[(N[(2.0 * t), $MachinePrecision] / N[(1.0 + t), $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 * t), $MachinePrecision] / N[(1.0 + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
code[t_] := Block[{t$95$1 = N[(N[(2.0 * t), $MachinePrecision] / N[(1.0 + t), $MachinePrecision]), $MachinePrecision]}, N[(N[(1.0 + N[Log[N[Exp[N[Power[t$95$1, 2.0], $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(2.0 + N[(t$95$1 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\frac{1 + \frac{2 \cdot t}{1 + t} \cdot \frac{2 \cdot t}{1 + t}}{2 + \frac{2 \cdot t}{1 + t} \cdot \frac{2 \cdot t}{1 + t}}
\begin{array}{l}
t_1 := \frac{2 \cdot t}{1 + t}\\
\frac{1 + \log \left(e^{{t_1}^{2}}\right)}{2 + t_1 \cdot t_1}
\end{array}



Bits error versus t
Results
Initial program 0.0
Applied add-log-exp_binary640.0
Applied pow2_binary640.0
Final simplification0.0
herbie shell --seed 2022129
(FPCore (t)
:name "Kahan p13 Example 1"
:precision binary64
(/ (+ 1.0 (* (/ (* 2.0 t) (+ 1.0 t)) (/ (* 2.0 t) (+ 1.0 t)))) (+ 2.0 (* (/ (* 2.0 t) (+ 1.0 t)) (/ (* 2.0 t) (+ 1.0 t))))))