Average Error: 0.0 → 0.0
Time: 12.9s
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 r55228 = 1.0;
        double r55229 = 2.0;
        double r55230 = t;
        double r55231 = r55229 * r55230;
        double r55232 = r55228 + r55230;
        double r55233 = r55231 / r55232;
        double r55234 = r55233 * r55233;
        double r55235 = r55228 + r55234;
        double r55236 = r55229 + r55234;
        double r55237 = r55235 / r55236;
        return r55237;
}

double f(double t) {
        double r55238 = 1.0;
        double r55239 = 2.0;
        double r55240 = t;
        double r55241 = r55239 * r55240;
        double r55242 = r55238 + r55240;
        double r55243 = r55241 / r55242;
        double r55244 = r55243 * r55243;
        double r55245 = exp(r55244);
        double r55246 = sqrt(r55245);
        double r55247 = log(r55246);
        double r55248 = log(r55247);
        double r55249 = exp(r55248);
        double r55250 = r55249 + r55247;
        double r55251 = r55238 + r55250;
        double r55252 = r55239 + r55244;
        double r55253 = r55251 / r55252;
        return r55253;
}

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))))))