Average Error: 0.0 → 0.0
Time: 2.7s
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 r53183 = 1.0;
        double r53184 = 2.0;
        double r53185 = t;
        double r53186 = r53184 * r53185;
        double r53187 = r53183 + r53185;
        double r53188 = r53186 / r53187;
        double r53189 = r53188 * r53188;
        double r53190 = r53183 + r53189;
        double r53191 = r53184 + r53189;
        double r53192 = r53190 / r53191;
        return r53192;
}

double f(double t) {
        double r53193 = 1.0;
        double r53194 = 2.0;
        double r53195 = t;
        double r53196 = r53194 * r53195;
        double r53197 = r53193 + r53195;
        double r53198 = r53196 / r53197;
        double r53199 = r53198 * r53198;
        double r53200 = r53193 + r53199;
        double r53201 = r53194 + r53199;
        double r53202 = r53200 / r53201;
        return r53202;
}

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