Average Error: 0.0 → 0.0
Time: 2.1m
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 r15382584 = 1.0;
        double r15382585 = 2.0;
        double r15382586 = t;
        double r15382587 = r15382585 * r15382586;
        double r15382588 = r15382584 + r15382586;
        double r15382589 = r15382587 / r15382588;
        double r15382590 = r15382589 * r15382589;
        double r15382591 = r15382584 + r15382590;
        double r15382592 = r15382585 + r15382590;
        double r15382593 = r15382591 / r15382592;
        return r15382593;
}

double f(double t) {
        double r15382594 = 1.0;
        double r15382595 = t;
        double r15382596 = 2.0;
        double r15382597 = r15382595 * r15382596;
        double r15382598 = r15382594 + r15382595;
        double r15382599 = r15382597 / r15382598;
        double r15382600 = r15382599 * r15382599;
        double r15382601 = r15382594 + r15382600;
        double r15382602 = exp(r15382600);
        double r15382603 = log(r15382602);
        double r15382604 = r15382603 + r15382596;
        double r15382605 = r15382601 / r15382604;
        return r15382605;
}

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