Average Error: 0.0 → 0.1
Time: 10.4s
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 r2207496 = 1.0;
        double r2207497 = 2.0;
        double r2207498 = t;
        double r2207499 = r2207497 * r2207498;
        double r2207500 = r2207496 + r2207498;
        double r2207501 = r2207499 / r2207500;
        double r2207502 = r2207501 * r2207501;
        double r2207503 = r2207496 + r2207502;
        double r2207504 = r2207497 + r2207502;
        double r2207505 = r2207503 / r2207504;
        return r2207505;
}

double f(double t) {
        double r2207506 = 1.0;
        double r2207507 = t;
        double r2207508 = 2.0;
        double r2207509 = r2207507 * r2207508;
        double r2207510 = r2207506 + r2207507;
        double r2207511 = r2207509 / r2207510;
        double r2207512 = r2207511 * r2207511;
        double r2207513 = r2207506 + r2207512;
        double r2207514 = exp(r2207512);
        double r2207515 = log(r2207514);
        double r2207516 = r2207515 + r2207508;
        double r2207517 = r2207513 / r2207516;
        return r2207517;
}

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.1

    \[\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.1

    \[\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 2019171 
(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))))))