Average Error: 0.0 → 0.0
Time: 23.0s
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 r61744 = 0.70711;
        double r61745 = 2.30753;
        double r61746 = x;
        double r61747 = 0.27061;
        double r61748 = r61746 * r61747;
        double r61749 = r61745 + r61748;
        double r61750 = 1.0;
        double r61751 = 0.99229;
        double r61752 = 0.04481;
        double r61753 = r61746 * r61752;
        double r61754 = r61751 + r61753;
        double r61755 = r61746 * r61754;
        double r61756 = r61750 + r61755;
        double r61757 = r61749 / r61756;
        double r61758 = r61757 - r61746;
        double r61759 = r61744 * r61758;
        return r61759;
}

double f(double x) {
        double r61760 = 0.27061;
        double r61761 = x;
        double r61762 = 2.30753;
        double r61763 = fma(r61760, r61761, r61762);
        double r61764 = 0.04481;
        double r61765 = 0.99229;
        double r61766 = fma(r61764, r61761, r61765);
        double r61767 = 1.0;
        double r61768 = fma(r61766, r61761, r61767);
        double r61769 = r61763 / r61768;
        double r61770 = r61769 - r61761;
        double r61771 = 0.70711;
        double r61772 = r61770 * r61771;
        return r61772;
}

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}{\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}\]
  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 2019322 +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)))