Average Error: 0.0 → 0.0
Time: 9.5s
Precision: 64
\[\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}}\]
\[\frac{1 + \frac{t \cdot 2}{1 + t} \cdot \frac{t \cdot 2}{1 + t}}{\log \left(e^{\frac{t \cdot 2}{1 + t} \cdot \frac{t \cdot 2}{1 + t}}\right) + 2}\]
\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}}
\frac{1 + \frac{t \cdot 2}{1 + t} \cdot \frac{t \cdot 2}{1 + t}}{\log \left(e^{\frac{t \cdot 2}{1 + t} \cdot \frac{t \cdot 2}{1 + t}}\right) + 2}
double f(double t) {
        double r2277571 = 1.0;
        double r2277572 = 2.0;
        double r2277573 = t;
        double r2277574 = r2277572 * r2277573;
        double r2277575 = r2277571 + r2277573;
        double r2277576 = r2277574 / r2277575;
        double r2277577 = r2277576 * r2277576;
        double r2277578 = r2277571 + r2277577;
        double r2277579 = r2277572 + r2277577;
        double r2277580 = r2277578 / r2277579;
        return r2277580;
}

double f(double t) {
        double r2277581 = 1.0;
        double r2277582 = t;
        double r2277583 = 2.0;
        double r2277584 = r2277582 * r2277583;
        double r2277585 = r2277581 + r2277582;
        double r2277586 = r2277584 / r2277585;
        double r2277587 = r2277586 * r2277586;
        double r2277588 = r2277581 + r2277587;
        double r2277589 = exp(r2277587);
        double r2277590 = log(r2277589);
        double r2277591 = r2277590 + r2277583;
        double r2277592 = r2277588 / r2277591;
        return r2277592;
}

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. Using strategy rm
  3. Applied add-log-exp0.0

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

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

Reproduce

herbie shell --seed 2019164 
(FPCore (t)
  :name "Kahan p13 Example 1"
  (/ (+ 1 (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))) (+ 2 (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t))))))