Average Error: 0.0 → 0.1
Time: 23.5s
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 + \left(\log \left(\sqrt{e^{\frac{t \cdot 2}{1 + t} \cdot \frac{t \cdot 2}{1 + t}}}\right) + \log \left(\sqrt{e^{\frac{t \cdot 2}{1 + t} \cdot \frac{t \cdot 2}{1 + t}}}\right)\right)}{2 + \frac{t \cdot 2}{1 + t} \cdot \frac{t \cdot 2}{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 + \left(\log \left(\sqrt{e^{\frac{t \cdot 2}{1 + t} \cdot \frac{t \cdot 2}{1 + t}}}\right) + \log \left(\sqrt{e^{\frac{t \cdot 2}{1 + t} \cdot \frac{t \cdot 2}{1 + t}}}\right)\right)}{2 + \frac{t \cdot 2}{1 + t} \cdot \frac{t \cdot 2}{1 + t}}
double f(double t) {
        double r1586379 = 1.0;
        double r1586380 = 2.0;
        double r1586381 = t;
        double r1586382 = r1586380 * r1586381;
        double r1586383 = r1586379 + r1586381;
        double r1586384 = r1586382 / r1586383;
        double r1586385 = r1586384 * r1586384;
        double r1586386 = r1586379 + r1586385;
        double r1586387 = r1586380 + r1586385;
        double r1586388 = r1586386 / r1586387;
        return r1586388;
}

double f(double t) {
        double r1586389 = 1.0;
        double r1586390 = t;
        double r1586391 = 2.0;
        double r1586392 = r1586390 * r1586391;
        double r1586393 = r1586389 + r1586390;
        double r1586394 = r1586392 / r1586393;
        double r1586395 = r1586394 * r1586394;
        double r1586396 = exp(r1586395);
        double r1586397 = sqrt(r1586396);
        double r1586398 = log(r1586397);
        double r1586399 = r1586398 + r1586398;
        double r1586400 = r1586389 + r1586399;
        double r1586401 = r1586391 + r1586395;
        double r1586402 = r1586400 / r1586401;
        return r1586402;
}

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.1

    \[\leadsto \frac{1 + \color{blue}{\log \left(e^{\frac{2 \cdot t}{1 + t} \cdot \frac{2 \cdot t}{1 + t}}\right)}}{2 + \frac{2 \cdot t}{1 + t} \cdot \frac{2 \cdot t}{1 + t}}\]
  4. Using strategy rm
  5. Applied add-sqr-sqrt0.1

    \[\leadsto \frac{1 + \log \color{blue}{\left(\sqrt{e^{\frac{2 \cdot t}{1 + t} \cdot \frac{2 \cdot t}{1 + t}}} \cdot \sqrt{e^{\frac{2 \cdot t}{1 + t} \cdot \frac{2 \cdot t}{1 + t}}}\right)}}{2 + \frac{2 \cdot t}{1 + t} \cdot \frac{2 \cdot t}{1 + t}}\]
  6. Applied log-prod0.1

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

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

Reproduce

herbie shell --seed 2019130 
(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))))))