Average Error: 0.0 → 0.0
Time: 22.7s
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 r1964590 = 1.0;
        double r1964591 = 2.0;
        double r1964592 = t;
        double r1964593 = r1964591 * r1964592;
        double r1964594 = r1964590 + r1964592;
        double r1964595 = r1964593 / r1964594;
        double r1964596 = r1964595 * r1964595;
        double r1964597 = r1964590 + r1964596;
        double r1964598 = r1964591 + r1964596;
        double r1964599 = r1964597 / r1964598;
        return r1964599;
}

double f(double t) {
        double r1964600 = 1.0;
        double r1964601 = t;
        double r1964602 = 2.0;
        double r1964603 = r1964601 * r1964602;
        double r1964604 = r1964600 + r1964601;
        double r1964605 = r1964603 / r1964604;
        double r1964606 = r1964605 * r1964605;
        double r1964607 = r1964600 + r1964606;
        double r1964608 = exp(r1964606);
        double r1964609 = log(r1964608);
        double r1964610 = r1964609 + r1964602;
        double r1964611 = r1964607 / r1964610;
        return r1964611;
}

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