Average Error: 0.0 → 0.0
Time: 17.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 + \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 r2295772 = 1.0;
        double r2295773 = 2.0;
        double r2295774 = t;
        double r2295775 = r2295773 * r2295774;
        double r2295776 = r2295772 + r2295774;
        double r2295777 = r2295775 / r2295776;
        double r2295778 = r2295777 * r2295777;
        double r2295779 = r2295772 + r2295778;
        double r2295780 = r2295773 + r2295778;
        double r2295781 = r2295779 / r2295780;
        return r2295781;
}

double f(double t) {
        double r2295782 = 1.0;
        double r2295783 = t;
        double r2295784 = 2.0;
        double r2295785 = r2295783 * r2295784;
        double r2295786 = r2295782 + r2295783;
        double r2295787 = r2295785 / r2295786;
        double r2295788 = r2295787 * r2295787;
        double r2295789 = exp(r2295788);
        double r2295790 = sqrt(r2295789);
        double r2295791 = log(r2295790);
        double r2295792 = r2295791 + r2295791;
        double r2295793 = r2295782 + r2295792;
        double r2295794 = r2295784 + r2295788;
        double r2295795 = r2295793 / r2295794;
        return r2295795;
}

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. Final simplification0.0

    \[\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 2019165 
(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))))))