Average Error: 0.0 → 0.0
Time: 4.3s
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 := t \cdot \frac{4}{2 + \left(t + \frac{1}{t}\right)}\\ \frac{1 + \log \left(e^{t_1}\right)}{2 + t_1} \end{array} \]
\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 := t \cdot \frac{4}{2 + \left(t + \frac{1}{t}\right)}\\
\frac{1 + \log \left(e^{t_1}\right)}{2 + t_1}
\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 (* t (/ 4.0 (+ 2.0 (+ t (/ 1.0 t)))))))
   (/ (+ 1.0 (log (exp 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 = t * (4.0 / (2.0 + (t + (1.0 / t))));
	return (1.0 + log(exp(t_1))) / (2.0 + t_1);
}

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. Simplified0.0

    \[\leadsto \color{blue}{\frac{1 + t \cdot \frac{4}{2 + \left(t + \frac{1}{t}\right)}}{2 + t \cdot \frac{4}{2 + \left(t + \frac{1}{t}\right)}}} \]
  3. Using strategy rm
  4. Applied add-log-exp_binary640.0

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

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

Reproduce

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