Average Error: 0.0 → 0.0
Time: 14.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(\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)
\mathsf{fma}\left(\mathsf{fma}\left(0.2706100000000000171951342053944244980812, x, 2.307529999999999859028321225196123123169\right), \frac{1}{\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 r93112 = 0.70711;
        double r93113 = 2.30753;
        double r93114 = x;
        double r93115 = 0.27061;
        double r93116 = r93114 * r93115;
        double r93117 = r93113 + r93116;
        double r93118 = 1.0;
        double r93119 = 0.99229;
        double r93120 = 0.04481;
        double r93121 = r93114 * r93120;
        double r93122 = r93119 + r93121;
        double r93123 = r93114 * r93122;
        double r93124 = r93118 + r93123;
        double r93125 = r93117 / r93124;
        double r93126 = r93125 - r93114;
        double r93127 = r93112 * r93126;
        return r93127;
}

double f(double x) {
        double r93128 = 0.27061;
        double r93129 = x;
        double r93130 = 2.30753;
        double r93131 = fma(r93128, r93129, r93130);
        double r93132 = 1.0;
        double r93133 = 0.04481;
        double r93134 = 0.99229;
        double r93135 = fma(r93133, r93129, r93134);
        double r93136 = 1.0;
        double r93137 = fma(r93135, r93129, r93136);
        double r93138 = r93132 / r93137;
        double r93139 = -r93129;
        double r93140 = fma(r93131, r93138, r93139);
        double r93141 = 0.70711;
        double r93142 = r93140 * r93141;
        return r93142;
}

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. Using strategy rm
  4. Applied div-inv0.0

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

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

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

Reproduce

herbie shell --seed 2019209 +o rules:numerics
(FPCore (x)
  :name "Numeric.SpecFunctions:invErfc from math-functions-0.1.5.2, B"
  :precision binary64
  (* 0.707110000000000016 (- (/ (+ 2.30753 (* x 0.27061000000000002)) (+ 1 (* x (+ 0.992290000000000005 (* x 0.044810000000000003))))) x)))