Average Error: 0.0 → 0.0
Time: 3.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{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 r57934 = 1.0;
        double r57935 = 2.0;
        double r57936 = t;
        double r57937 = r57935 * r57936;
        double r57938 = r57934 + r57936;
        double r57939 = r57937 / r57938;
        double r57940 = r57939 * r57939;
        double r57941 = r57934 + r57940;
        double r57942 = r57935 + r57940;
        double r57943 = r57941 / r57942;
        return r57943;
}

double f(double t) {
        double r57944 = 1.0;
        double r57945 = 2.0;
        double r57946 = t;
        double r57947 = r57945 * r57946;
        double r57948 = r57944 + r57946;
        double r57949 = r57947 / r57948;
        double r57950 = r57949 * r57949;
        double r57951 = r57944 + r57950;
        double r57952 = r57945 + r57950;
        double r57953 = r57951 / r57952;
        return r57953;
}

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