Average Error: 0.0 → 0.0
Time: 14.2s
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{2 + \log \left(e^{\frac{2 \cdot t}{1 + t} \cdot \frac{2 \cdot t}{1 + t}}\right)}{1 + \frac{2 \cdot t}{1 + t} \cdot \frac{2 \cdot t}{1 + t}}}\]
\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{2 + \log \left(e^{\frac{2 \cdot t}{1 + t} \cdot \frac{2 \cdot t}{1 + t}}\right)}{1 + \frac{2 \cdot t}{1 + t} \cdot \frac{2 \cdot t}{1 + t}}}
double f(double t) {
        double r50352 = 1.0;
        double r50353 = 2.0;
        double r50354 = t;
        double r50355 = r50353 * r50354;
        double r50356 = r50352 + r50354;
        double r50357 = r50355 / r50356;
        double r50358 = r50357 * r50357;
        double r50359 = r50352 + r50358;
        double r50360 = r50353 + r50358;
        double r50361 = r50359 / r50360;
        return r50361;
}

double f(double t) {
        double r50362 = 1.0;
        double r50363 = 2.0;
        double r50364 = t;
        double r50365 = r50363 * r50364;
        double r50366 = 1.0;
        double r50367 = r50366 + r50364;
        double r50368 = r50365 / r50367;
        double r50369 = r50368 * r50368;
        double r50370 = exp(r50369);
        double r50371 = log(r50370);
        double r50372 = r50363 + r50371;
        double r50373 = r50366 + r50369;
        double r50374 = r50372 / r50373;
        double r50375 = r50362 / r50374;
        return r50375;
}

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 clear-num0.0

    \[\leadsto \color{blue}{\frac{1}{\frac{2 + \frac{2 \cdot t}{1 + t} \cdot \frac{2 \cdot t}{1 + t}}{1 + \frac{2 \cdot t}{1 + t} \cdot \frac{2 \cdot t}{1 + t}}}}\]
  4. Using strategy rm
  5. Applied add-log-exp0.0

    \[\leadsto \frac{1}{\frac{2 + \color{blue}{\log \left(e^{\frac{2 \cdot t}{1 + t} \cdot \frac{2 \cdot t}{1 + t}}\right)}}{1 + \frac{2 \cdot t}{1 + t} \cdot \frac{2 \cdot t}{1 + t}}}\]
  6. Final simplification0.0

    \[\leadsto \frac{1}{\frac{2 + \log \left(e^{\frac{2 \cdot t}{1 + t} \cdot \frac{2 \cdot t}{1 + t}}\right)}{1 + \frac{2 \cdot t}{1 + t} \cdot \frac{2 \cdot t}{1 + t}}}\]

Reproduce

herbie shell --seed 2020043 
(FPCore (t)
  :name "Kahan p13 Example 1"
  :precision binary64
  (/ (+ 1 (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t)))) (+ 2 (* (/ (* 2 t) (+ 1 t)) (/ (* 2 t) (+ 1 t))))))