Average Error: 0.0 → 0.0
Time: 42.1s
Precision: 64
\[0.7071100000000000163069557856942992657423 \cdot \left(\frac{2.307529999999999859028321225196123123169 + x \cdot 0.2706100000000000171951342053944244980812}{1 + x \cdot \left(0.992290000000000005364597654988756403327 + x \cdot 0.04481000000000000260680366181986755691469\right)} - x\right)\]
\[\left(\frac{\mathsf{fma}\left(0.2706100000000000171951342053944244980812, x, 2.307529999999999859028321225196123123169\right)}{\mathsf{fma}\left(\mathsf{fma}\left(0.04481000000000000260680366181986755691469, x, 0.992290000000000005364597654988756403327\right), x, 1\right)} - x\right) \cdot 0.7071100000000000163069557856942992657423\]
0.7071100000000000163069557856942992657423 \cdot \left(\frac{2.307529999999999859028321225196123123169 + x \cdot 0.2706100000000000171951342053944244980812}{1 + x \cdot \left(0.992290000000000005364597654988756403327 + x \cdot 0.04481000000000000260680366181986755691469\right)} - x\right)
\left(\frac{\mathsf{fma}\left(0.2706100000000000171951342053944244980812, x, 2.307529999999999859028321225196123123169\right)}{\mathsf{fma}\left(\mathsf{fma}\left(0.04481000000000000260680366181986755691469, x, 0.992290000000000005364597654988756403327\right), x, 1\right)} - x\right) \cdot 0.7071100000000000163069557856942992657423
double f(double x) {
        double r4660748 = 0.70711;
        double r4660749 = 2.30753;
        double r4660750 = x;
        double r4660751 = 0.27061;
        double r4660752 = r4660750 * r4660751;
        double r4660753 = r4660749 + r4660752;
        double r4660754 = 1.0;
        double r4660755 = 0.99229;
        double r4660756 = 0.04481;
        double r4660757 = r4660750 * r4660756;
        double r4660758 = r4660755 + r4660757;
        double r4660759 = r4660750 * r4660758;
        double r4660760 = r4660754 + r4660759;
        double r4660761 = r4660753 / r4660760;
        double r4660762 = r4660761 - r4660750;
        double r4660763 = r4660748 * r4660762;
        return r4660763;
}

double f(double x) {
        double r4660764 = 0.27061;
        double r4660765 = x;
        double r4660766 = 2.30753;
        double r4660767 = fma(r4660764, r4660765, r4660766);
        double r4660768 = 0.04481;
        double r4660769 = 0.99229;
        double r4660770 = fma(r4660768, r4660765, r4660769);
        double r4660771 = 1.0;
        double r4660772 = fma(r4660770, r4660765, r4660771);
        double r4660773 = r4660767 / r4660772;
        double r4660774 = r4660773 - r4660765;
        double r4660775 = 0.70711;
        double r4660776 = r4660774 * r4660775;
        return r4660776;
}

Error

Bits error versus x

Derivation

  1. Initial program 0.0

    \[0.7071100000000000163069557856942992657423 \cdot \left(\frac{2.307529999999999859028321225196123123169 + x \cdot 0.2706100000000000171951342053944244980812}{1 + x \cdot \left(0.992290000000000005364597654988756403327 + x \cdot 0.04481000000000000260680366181986755691469\right)} - x\right)\]
  2. Simplified0.0

    \[\leadsto \color{blue}{0.7071100000000000163069557856942992657423 \cdot \left(\frac{\mathsf{fma}\left(0.2706100000000000171951342053944244980812, x, 2.307529999999999859028321225196123123169\right)}{\mathsf{fma}\left(\mathsf{fma}\left(0.04481000000000000260680366181986755691469, x, 0.992290000000000005364597654988756403327\right), x, 1\right)} - x\right)}\]
  3. Final simplification0.0

    \[\leadsto \left(\frac{\mathsf{fma}\left(0.2706100000000000171951342053944244980812, x, 2.307529999999999859028321225196123123169\right)}{\mathsf{fma}\left(\mathsf{fma}\left(0.04481000000000000260680366181986755691469, x, 0.992290000000000005364597654988756403327\right), x, 1\right)} - x\right) \cdot 0.7071100000000000163069557856942992657423\]

Reproduce

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