Average Error: 0.0 → 0.0
Time: 12.5s
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{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{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{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}}
double f(double t) {
        double r51607 = 1.0;
        double r51608 = 2.0;
        double r51609 = t;
        double r51610 = r51608 * r51609;
        double r51611 = r51607 + r51609;
        double r51612 = r51610 / r51611;
        double r51613 = r51612 * r51612;
        double r51614 = r51607 + r51613;
        double r51615 = r51608 + r51613;
        double r51616 = r51614 / r51615;
        return r51616;
}

double f(double t) {
        double r51617 = 1.0;
        double r51618 = 2.0;
        double r51619 = t;
        double r51620 = r51618 * r51619;
        double r51621 = r51617 + r51619;
        double r51622 = r51620 / r51621;
        double r51623 = r51622 * r51622;
        double r51624 = r51617 + r51623;
        double r51625 = r51618 + r51623;
        double r51626 = r51624 / r51625;
        return r51626;
}

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

    \[\leadsto \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}}\]

Reproduce

herbie shell --seed 2019208 +o rules:numerics
(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))))))