Average Error: 0.0 → 0.5
Time: 2.8s
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 r65916 = 1.0;
        double r65917 = 2.0;
        double r65918 = t;
        double r65919 = r65917 * r65918;
        double r65920 = r65916 + r65918;
        double r65921 = r65919 / r65920;
        double r65922 = r65921 * r65921;
        double r65923 = r65916 + r65922;
        double r65924 = r65917 + r65922;
        double r65925 = r65923 / r65924;
        return r65925;
}

double f(double t) {
        double r65926 = 1.0;
        double r65927 = 2.0;
        double r65928 = t;
        double r65929 = r65927 * r65928;
        double r65930 = r65926 + r65928;
        double r65931 = r65929 / r65930;
        double r65932 = r65931 * r65931;
        double r65933 = r65926 + r65932;
        double r65934 = fma(r65931, r65931, r65927);
        double r65935 = 3.0;
        double r65936 = pow(r65934, r65935);
        double r65937 = cbrt(r65936);
        double r65938 = r65933 / r65937;
        return r65938;
}

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