Average Error: 0.1 → 0.1
Time: 11.4s
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{\log \left(e^{\frac{2 \cdot t}{t + 1} \cdot \frac{2 \cdot t}{t + 1}} \cdot e\right)}{\frac{2 \cdot t}{t + 1} \cdot \frac{2 \cdot t}{t + 1} + 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{\log \left(e^{\frac{2 \cdot t}{t + 1} \cdot \frac{2 \cdot t}{t + 1}} \cdot e\right)}{\frac{2 \cdot t}{t + 1} \cdot \frac{2 \cdot t}{t + 1} + 2}
double f(double t) {
        double r1146838 = 1.0;
        double r1146839 = 2.0;
        double r1146840 = t;
        double r1146841 = r1146839 * r1146840;
        double r1146842 = r1146838 + r1146840;
        double r1146843 = r1146841 / r1146842;
        double r1146844 = r1146843 * r1146843;
        double r1146845 = r1146838 + r1146844;
        double r1146846 = r1146839 + r1146844;
        double r1146847 = r1146845 / r1146846;
        return r1146847;
}

double f(double t) {
        double r1146848 = 2.0;
        double r1146849 = t;
        double r1146850 = r1146848 * r1146849;
        double r1146851 = 1.0;
        double r1146852 = r1146849 + r1146851;
        double r1146853 = r1146850 / r1146852;
        double r1146854 = r1146853 * r1146853;
        double r1146855 = exp(r1146854);
        double r1146856 = exp(1.0);
        double r1146857 = r1146855 * r1146856;
        double r1146858 = log(r1146857);
        double r1146859 = r1146854 + r1146848;
        double r1146860 = r1146858 / r1146859;
        return r1146860;
}

Error

Bits error versus t

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.1

    \[\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. Applied add-log-exp0.1

    \[\leadsto \frac{\color{blue}{\log \left(e^{1}\right)} + \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}}\]
  5. Applied sum-log0.1

    \[\leadsto \frac{\color{blue}{\log \left(e^{1} \cdot 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. Final simplification0.1

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

Reproduce

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