Average Error: 0.0 → 0.0
Time: 6.0m
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 r3188585 = 1.0;
        double r3188586 = 2.0;
        double r3188587 = t;
        double r3188588 = r3188586 * r3188587;
        double r3188589 = r3188585 + r3188587;
        double r3188590 = r3188588 / r3188589;
        double r3188591 = r3188590 * r3188590;
        double r3188592 = r3188585 + r3188591;
        double r3188593 = r3188586 + r3188591;
        double r3188594 = r3188592 / r3188593;
        return r3188594;
}

double f(double t) {
        double r3188595 = 1.0;
        double r3188596 = t;
        double r3188597 = 2.0;
        double r3188598 = r3188596 * r3188597;
        double r3188599 = r3188595 + r3188596;
        double r3188600 = r3188598 / r3188599;
        double r3188601 = r3188600 * r3188600;
        double r3188602 = r3188595 + r3188601;
        double r3188603 = exp(r3188601);
        double r3188604 = log(r3188603);
        double r3188605 = r3188604 + r3188597;
        double r3188606 = r3188602 / r3188605;
        return r3188606;
}

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