Average Error: 0.0 → 0.0
Time: 14.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 r2540823 = 1.0;
        double r2540824 = 2.0;
        double r2540825 = t;
        double r2540826 = r2540824 * r2540825;
        double r2540827 = r2540823 + r2540825;
        double r2540828 = r2540826 / r2540827;
        double r2540829 = r2540828 * r2540828;
        double r2540830 = r2540823 + r2540829;
        double r2540831 = r2540824 + r2540829;
        double r2540832 = r2540830 / r2540831;
        return r2540832;
}

double f(double t) {
        double r2540833 = 1.0;
        double r2540834 = t;
        double r2540835 = 2.0;
        double r2540836 = r2540834 * r2540835;
        double r2540837 = r2540833 + r2540834;
        double r2540838 = r2540836 / r2540837;
        double r2540839 = r2540838 * r2540838;
        double r2540840 = r2540833 + r2540839;
        double r2540841 = exp(r2540839);
        double r2540842 = log(r2540841);
        double r2540843 = r2540842 + r2540835;
        double r2540844 = r2540840 / r2540843;
        return r2540844;
}

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 2019162 
(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))))))