Average Error: 0.0 → 0.0
Time: 16.5s
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)\]
\[\mathsf{fma}\left(\mathsf{fma}\left(0.2706100000000000171951342053944244980812, x, 2.307529999999999859028321225196123123169\right), \frac{1}{\mathsf{fma}\left(x, \mathsf{fma}\left(x, 0.04481000000000000260680366181986755691469, 0.992290000000000005364597654988756403327\right), 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)
\mathsf{fma}\left(\mathsf{fma}\left(0.2706100000000000171951342053944244980812, x, 2.307529999999999859028321225196123123169\right), \frac{1}{\mathsf{fma}\left(x, \mathsf{fma}\left(x, 0.04481000000000000260680366181986755691469, 0.992290000000000005364597654988756403327\right), 1\right)}, -x\right) \cdot 0.7071100000000000163069557856942992657423
double f(double x) {
        double r4358885 = 0.70711;
        double r4358886 = 2.30753;
        double r4358887 = x;
        double r4358888 = 0.27061;
        double r4358889 = r4358887 * r4358888;
        double r4358890 = r4358886 + r4358889;
        double r4358891 = 1.0;
        double r4358892 = 0.99229;
        double r4358893 = 0.04481;
        double r4358894 = r4358887 * r4358893;
        double r4358895 = r4358892 + r4358894;
        double r4358896 = r4358887 * r4358895;
        double r4358897 = r4358891 + r4358896;
        double r4358898 = r4358890 / r4358897;
        double r4358899 = r4358898 - r4358887;
        double r4358900 = r4358885 * r4358899;
        return r4358900;
}

double f(double x) {
        double r4358901 = 0.27061;
        double r4358902 = x;
        double r4358903 = 2.30753;
        double r4358904 = fma(r4358901, r4358902, r4358903);
        double r4358905 = 1.0;
        double r4358906 = 0.04481;
        double r4358907 = 0.99229;
        double r4358908 = fma(r4358902, r4358906, r4358907);
        double r4358909 = 1.0;
        double r4358910 = fma(r4358902, r4358908, r4358909);
        double r4358911 = r4358905 / r4358910;
        double r4358912 = -r4358902;
        double r4358913 = fma(r4358904, r4358911, r4358912);
        double r4358914 = 0.70711;
        double r4358915 = r4358913 * r4358914;
        return r4358915;
}

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(x, \mathsf{fma}\left(x, 0.04481000000000000260680366181986755691469, 0.992290000000000005364597654988756403327\right), 1\right)} - x\right)}\]
  3. Using strategy rm
  4. Applied div-inv0.0

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

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

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

Reproduce

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