Average Error: 0.0 → 0.0
Time: 15.1s
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 r2497605 = 1.0;
        double r2497606 = 2.0;
        double r2497607 = t;
        double r2497608 = r2497606 * r2497607;
        double r2497609 = r2497605 + r2497607;
        double r2497610 = r2497608 / r2497609;
        double r2497611 = r2497610 * r2497610;
        double r2497612 = r2497605 + r2497611;
        double r2497613 = r2497606 + r2497611;
        double r2497614 = r2497612 / r2497613;
        return r2497614;
}

double f(double t) {
        double r2497615 = 1.0;
        double r2497616 = t;
        double r2497617 = 2.0;
        double r2497618 = r2497616 * r2497617;
        double r2497619 = r2497615 + r2497616;
        double r2497620 = r2497618 / r2497619;
        double r2497621 = r2497620 * r2497620;
        double r2497622 = r2497615 + r2497621;
        double r2497623 = exp(r2497621);
        double r2497624 = log(r2497623);
        double r2497625 = r2497624 + r2497617;
        double r2497626 = r2497622 / r2497625;
        return r2497626;
}

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