Average Error: 0.0 → 0.0
Time: 3.4s
Precision: binary64
\[\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 := {\left(\frac{t \cdot 2}{1 + t}\right)}^{2}\\ e^{\log \left(\frac{1 + t_1}{2 + t_1}\right)} \end{array} \]
(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 (pow (/ (* t 2.0) (+ 1.0 t)) 2.0)))
   (exp (log (/ (+ 1.0 t_1) (+ 2.0 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 = pow(((t * 2.0) / (1.0 + t)), 2.0);
	return exp(log(((1.0 + t_1) / (2.0 + 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 = ((t * 2.0d0) / (1.0d0 + t)) ** 2.0d0
    code = exp(log(((1.0d0 + t_1) / (2.0d0 + 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 = Math.pow(((t * 2.0) / (1.0 + t)), 2.0);
	return Math.exp(Math.log(((1.0 + t_1) / (2.0 + 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 = math.pow(((t * 2.0) / (1.0 + t)), 2.0)
	return math.exp(math.log(((1.0 + t_1) / (2.0 + 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(t * 2.0) / Float64(1.0 + t)) ^ 2.0
	return exp(log(Float64(Float64(1.0 + t_1) / Float64(2.0 + 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 = ((t * 2.0) / (1.0 + t)) ^ 2.0;
	tmp = exp(log(((1.0 + t_1) / (2.0 + 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[Power[N[(N[(t * 2.0), $MachinePrecision] / N[(1.0 + t), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]}, N[Exp[N[Log[N[(N[(1.0 + t$95$1), $MachinePrecision] / N[(2.0 + t$95$1), $MachinePrecision]), $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 := {\left(\frac{t \cdot 2}{1 + t}\right)}^{2}\\
e^{\log \left(\frac{1 + t_1}{2 + t_1}\right)}
\end{array}

Error

Bits error versus t

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.0

    \[\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}} \]
  2. Applied egg-rr0.0

    \[\leadsto \frac{1 + \frac{2 \cdot t}{1 + t} \cdot \frac{2 \cdot t}{1 + t}}{2 + \color{blue}{\log \left(e^{{\left(\frac{t}{\frac{t + 1}{2}}\right)}^{2}}\right)}} \]
  3. Applied egg-rr0.0

    \[\leadsto \color{blue}{{\left(\frac{2 + {\left(t \cdot \frac{2}{t + 1}\right)}^{2}}{1 + {\left(t \cdot \frac{2}{t + 1}\right)}^{2}}\right)}^{-1}} \]
  4. Applied egg-rr0.0

    \[\leadsto \color{blue}{e^{\log \left(\frac{1 + {\left(\frac{t \cdot 2}{t + 1}\right)}^{2}}{2 + {\left(\frac{t \cdot 2}{t + 1}\right)}^{2}}\right) \cdot 1}} \]
  5. Final simplification0.0

    \[\leadsto e^{\log \left(\frac{1 + {\left(\frac{t \cdot 2}{1 + t}\right)}^{2}}{2 + {\left(\frac{t \cdot 2}{1 + t}\right)}^{2}}\right)} \]

Reproduce

herbie shell --seed 2022166 
(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))))))