Average Error: 0.0 → 0.0
Time: 27.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 + \frac{t \cdot 2}{1 + t} \cdot \frac{t \cdot 2}{1 + t}}{\log \left(e^{\frac{t \cdot 2}{1 + t} \cdot \frac{t \cdot 2}{1 + t}}\right) + 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{1 + \frac{t \cdot 2}{1 + t} \cdot \frac{t \cdot 2}{1 + t}}{\log \left(e^{\frac{t \cdot 2}{1 + t} \cdot \frac{t \cdot 2}{1 + t}}\right) + 2}
double f(double t) {
        double r2071268 = 1.0;
        double r2071269 = 2.0;
        double r2071270 = t;
        double r2071271 = r2071269 * r2071270;
        double r2071272 = r2071268 + r2071270;
        double r2071273 = r2071271 / r2071272;
        double r2071274 = r2071273 * r2071273;
        double r2071275 = r2071268 + r2071274;
        double r2071276 = r2071269 + r2071274;
        double r2071277 = r2071275 / r2071276;
        return r2071277;
}

double f(double t) {
        double r2071278 = 1.0;
        double r2071279 = t;
        double r2071280 = 2.0;
        double r2071281 = r2071279 * r2071280;
        double r2071282 = r2071278 + r2071279;
        double r2071283 = r2071281 / r2071282;
        double r2071284 = r2071283 * r2071283;
        double r2071285 = r2071278 + r2071284;
        double r2071286 = exp(r2071284);
        double r2071287 = log(r2071286);
        double r2071288 = r2071287 + r2071280;
        double r2071289 = r2071285 / r2071288;
        return r2071289;
}

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

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

Reproduce

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