Average Error: 0.0 → 0.0
Time: 21.5s
Precision: 64
\[0.707110000000000016 \cdot \left(\frac{2.30753 + x \cdot 0.27061000000000002}{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)} - x\right)\]
\[\frac{\mathsf{fma}\left(0.27061000000000002, x, 2.30753\right)}{\frac{\mathsf{fma}\left(x, \mathsf{fma}\left(0.044810000000000003, x, 0.992290000000000005\right), 1\right)}{0.707110000000000016}} + \left(-x\right) \cdot 0.707110000000000016\]
0.707110000000000016 \cdot \left(\frac{2.30753 + x \cdot 0.27061000000000002}{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)} - x\right)
\frac{\mathsf{fma}\left(0.27061000000000002, x, 2.30753\right)}{\frac{\mathsf{fma}\left(x, \mathsf{fma}\left(0.044810000000000003, x, 0.992290000000000005\right), 1\right)}{0.707110000000000016}} + \left(-x\right) \cdot 0.707110000000000016
double f(double x) {
        double r117928 = 0.70711;
        double r117929 = 2.30753;
        double r117930 = x;
        double r117931 = 0.27061;
        double r117932 = r117930 * r117931;
        double r117933 = r117929 + r117932;
        double r117934 = 1.0;
        double r117935 = 0.99229;
        double r117936 = 0.04481;
        double r117937 = r117930 * r117936;
        double r117938 = r117935 + r117937;
        double r117939 = r117930 * r117938;
        double r117940 = r117934 + r117939;
        double r117941 = r117933 / r117940;
        double r117942 = r117941 - r117930;
        double r117943 = r117928 * r117942;
        return r117943;
}

double f(double x) {
        double r117944 = 0.27061;
        double r117945 = x;
        double r117946 = 2.30753;
        double r117947 = fma(r117944, r117945, r117946);
        double r117948 = 0.04481;
        double r117949 = 0.99229;
        double r117950 = fma(r117948, r117945, r117949);
        double r117951 = 1.0;
        double r117952 = fma(r117945, r117950, r117951);
        double r117953 = 0.70711;
        double r117954 = r117952 / r117953;
        double r117955 = r117947 / r117954;
        double r117956 = -r117945;
        double r117957 = r117956 * r117953;
        double r117958 = r117955 + r117957;
        return r117958;
}

Error

Bits error versus x

Derivation

  1. Initial program 0.0

    \[0.707110000000000016 \cdot \left(\frac{2.30753 + x \cdot 0.27061000000000002}{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)} - x\right)\]
  2. Using strategy rm
  3. Applied sub-neg0.0

    \[\leadsto 0.707110000000000016 \cdot \color{blue}{\left(\frac{2.30753 + x \cdot 0.27061000000000002}{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)} + \left(-x\right)\right)}\]
  4. Applied distribute-lft-in0.0

    \[\leadsto \color{blue}{0.707110000000000016 \cdot \frac{2.30753 + x \cdot 0.27061000000000002}{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)} + 0.707110000000000016 \cdot \left(-x\right)}\]
  5. Simplified0.0

    \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(0.27061000000000002, x, 2.30753\right)}{\frac{\mathsf{fma}\left(x, \mathsf{fma}\left(0.044810000000000003, x, 0.992290000000000005\right), 1\right)}{0.707110000000000016}}} + 0.707110000000000016 \cdot \left(-x\right)\]
  6. Simplified0.0

    \[\leadsto \frac{\mathsf{fma}\left(0.27061000000000002, x, 2.30753\right)}{\frac{\mathsf{fma}\left(x, \mathsf{fma}\left(0.044810000000000003, x, 0.992290000000000005\right), 1\right)}{0.707110000000000016}} + \color{blue}{\left(-x\right) \cdot 0.707110000000000016}\]
  7. Final simplification0.0

    \[\leadsto \frac{\mathsf{fma}\left(0.27061000000000002, x, 2.30753\right)}{\frac{\mathsf{fma}\left(x, \mathsf{fma}\left(0.044810000000000003, x, 0.992290000000000005\right), 1\right)}{0.707110000000000016}} + \left(-x\right) \cdot 0.707110000000000016\]

Reproduce

herbie shell --seed 2020045 +o rules:numerics
(FPCore (x)
  :name "Numeric.SpecFunctions:invErfc from math-functions-0.1.5.2, B"
  :precision binary64
  (* 0.70711 (- (/ (+ 2.30753 (* x 0.27061)) (+ 1 (* x (+ 0.99229 (* x 0.04481))))) x)))