Average Error: 0.0 → 0.0
Time: 23.0s
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 r3279728 = 1.0;
        double r3279729 = 2.0;
        double r3279730 = t;
        double r3279731 = r3279729 * r3279730;
        double r3279732 = r3279728 + r3279730;
        double r3279733 = r3279731 / r3279732;
        double r3279734 = r3279733 * r3279733;
        double r3279735 = r3279728 + r3279734;
        double r3279736 = r3279729 + r3279734;
        double r3279737 = r3279735 / r3279736;
        return r3279737;
}

double f(double t) {
        double r3279738 = 1.0;
        double r3279739 = t;
        double r3279740 = 2.0;
        double r3279741 = r3279739 * r3279740;
        double r3279742 = r3279738 + r3279739;
        double r3279743 = r3279741 / r3279742;
        double r3279744 = r3279743 * r3279743;
        double r3279745 = r3279738 + r3279744;
        double r3279746 = exp(r3279744);
        double r3279747 = log(r3279746);
        double r3279748 = r3279747 + r3279740;
        double r3279749 = r3279745 / r3279748;
        return r3279749;
}

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 2019192 
(FPCore (t)
  :name "Kahan p13 Example 1"
  (/ (+ 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))))))