Average Error: 0.0 → 0.0
Time: 8.9s
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 r782249 = 1.0;
        double r782250 = 2.0;
        double r782251 = t;
        double r782252 = r782250 * r782251;
        double r782253 = r782249 + r782251;
        double r782254 = r782252 / r782253;
        double r782255 = r782254 * r782254;
        double r782256 = r782249 + r782255;
        double r782257 = r782250 + r782255;
        double r782258 = r782256 / r782257;
        return r782258;
}

double f(double t) {
        double r782259 = 1.0;
        double r782260 = t;
        double r782261 = 2.0;
        double r782262 = r782260 * r782261;
        double r782263 = r782259 + r782260;
        double r782264 = r782262 / r782263;
        double r782265 = r782264 * r782264;
        double r782266 = r782259 + r782265;
        double r782267 = exp(r782265);
        double r782268 = log(r782267);
        double r782269 = r782268 + r782261;
        double r782270 = r782266 / r782269;
        return r782270;
}

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