Average Error: 0.0 → 0.5
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}}{\sqrt[3]{{\left(\mathsf{fma}\left(\frac{2 \cdot t}{1 + t}, \frac{2 \cdot t}{1 + t}, 2\right)\right)}^{3}}}\]
\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}}{\sqrt[3]{{\left(\mathsf{fma}\left(\frac{2 \cdot t}{1 + t}, \frac{2 \cdot t}{1 + t}, 2\right)\right)}^{3}}}
double f(double t) {
        double r65977 = 1.0;
        double r65978 = 2.0;
        double r65979 = t;
        double r65980 = r65978 * r65979;
        double r65981 = r65977 + r65979;
        double r65982 = r65980 / r65981;
        double r65983 = r65982 * r65982;
        double r65984 = r65977 + r65983;
        double r65985 = r65978 + r65983;
        double r65986 = r65984 / r65985;
        return r65986;
}

double f(double t) {
        double r65987 = 1.0;
        double r65988 = 2.0;
        double r65989 = t;
        double r65990 = r65988 * r65989;
        double r65991 = r65987 + r65989;
        double r65992 = r65990 / r65991;
        double r65993 = r65992 * r65992;
        double r65994 = r65987 + r65993;
        double r65995 = fma(r65992, r65992, r65988);
        double r65996 = 3.0;
        double r65997 = pow(r65995, r65996);
        double r65998 = cbrt(r65997);
        double r65999 = r65994 / r65998;
        return r65999;
}

Error

Bits error versus t

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-cbrt-cube0.5

    \[\leadsto \frac{1 + \frac{2 \cdot t}{1 + t} \cdot \frac{2 \cdot t}{1 + t}}{\color{blue}{\sqrt[3]{\left(\left(2 + \frac{2 \cdot t}{1 + t} \cdot \frac{2 \cdot t}{1 + t}\right) \cdot \left(2 + \frac{2 \cdot t}{1 + t} \cdot \frac{2 \cdot t}{1 + t}\right)\right) \cdot \left(2 + \frac{2 \cdot t}{1 + t} \cdot \frac{2 \cdot t}{1 + t}\right)}}}\]
  4. Simplified0.5

    \[\leadsto \frac{1 + \frac{2 \cdot t}{1 + t} \cdot \frac{2 \cdot t}{1 + t}}{\sqrt[3]{\color{blue}{{\left(\mathsf{fma}\left(\frac{2 \cdot t}{1 + t}, \frac{2 \cdot t}{1 + t}, 2\right)\right)}^{3}}}}\]
  5. Final simplification0.5

    \[\leadsto \frac{1 + \frac{2 \cdot t}{1 + t} \cdot \frac{2 \cdot t}{1 + t}}{\sqrt[3]{{\left(\mathsf{fma}\left(\frac{2 \cdot t}{1 + t}, \frac{2 \cdot t}{1 + t}, 2\right)\right)}^{3}}}\]

Reproduce

herbie shell --seed 2020062 +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))))))