Average Error: 0.0 → 0.0
Time: 15.2s
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 r2426024 = 1.0;
        double r2426025 = 2.0;
        double r2426026 = t;
        double r2426027 = r2426025 * r2426026;
        double r2426028 = r2426024 + r2426026;
        double r2426029 = r2426027 / r2426028;
        double r2426030 = r2426029 * r2426029;
        double r2426031 = r2426024 + r2426030;
        double r2426032 = r2426025 + r2426030;
        double r2426033 = r2426031 / r2426032;
        return r2426033;
}

double f(double t) {
        double r2426034 = 1.0;
        double r2426035 = t;
        double r2426036 = 2.0;
        double r2426037 = r2426035 * r2426036;
        double r2426038 = r2426034 + r2426035;
        double r2426039 = r2426037 / r2426038;
        double r2426040 = r2426039 * r2426039;
        double r2426041 = r2426034 + r2426040;
        double r2426042 = exp(r2426040);
        double r2426043 = log(r2426042);
        double r2426044 = r2426043 + r2426036;
        double r2426045 = r2426041 / r2426044;
        return r2426045;
}

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