Average Error: 0.0 → 0.0
Time: 13.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 + \left(e^{\log \left(\log \left(\sqrt{e^{\frac{2 \cdot t}{1 + t} \cdot \frac{2 \cdot t}{1 + t}}}\right)\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}}\]
\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(e^{\log \left(\log \left(\sqrt{e^{\frac{2 \cdot t}{1 + t} \cdot \frac{2 \cdot t}{1 + t}}}\right)\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}}
double f(double t) {
        double r50455 = 1.0;
        double r50456 = 2.0;
        double r50457 = t;
        double r50458 = r50456 * r50457;
        double r50459 = r50455 + r50457;
        double r50460 = r50458 / r50459;
        double r50461 = r50460 * r50460;
        double r50462 = r50455 + r50461;
        double r50463 = r50456 + r50461;
        double r50464 = r50462 / r50463;
        return r50464;
}

double f(double t) {
        double r50465 = 1.0;
        double r50466 = 2.0;
        double r50467 = t;
        double r50468 = r50466 * r50467;
        double r50469 = r50465 + r50467;
        double r50470 = r50468 / r50469;
        double r50471 = r50470 * r50470;
        double r50472 = exp(r50471);
        double r50473 = sqrt(r50472);
        double r50474 = log(r50473);
        double r50475 = log(r50474);
        double r50476 = exp(r50475);
        double r50477 = r50476 + r50474;
        double r50478 = r50465 + r50477;
        double r50479 = r50466 + r50471;
        double r50480 = r50478 / r50479;
        return r50480;
}

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 + \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.0

    \[\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.0

    \[\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. Using strategy rm
  8. Applied add-exp-log0.0

    \[\leadsto \frac{1 + \left(\color{blue}{e^{\log \left(\log \left(\sqrt{e^{\frac{2 \cdot t}{1 + t} \cdot \frac{2 \cdot t}{1 + t}}}\right)\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}}\]
  9. Final simplification0.0

    \[\leadsto \frac{1 + \left(e^{\log \left(\log \left(\sqrt{e^{\frac{2 \cdot t}{1 + t} \cdot \frac{2 \cdot t}{1 + t}}}\right)\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}}\]

Reproduce

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