Average Error: 0.0 → 0.0
Time: 13.6s
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(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)
\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) \cdot 0.7071100000000000163069557856942992657423
double f(double x) {
        double r3795129 = 0.70711;
        double r3795130 = 2.30753;
        double r3795131 = x;
        double r3795132 = 0.27061;
        double r3795133 = r3795131 * r3795132;
        double r3795134 = r3795130 + r3795133;
        double r3795135 = 1.0;
        double r3795136 = 0.99229;
        double r3795137 = 0.04481;
        double r3795138 = r3795131 * r3795137;
        double r3795139 = r3795136 + r3795138;
        double r3795140 = r3795131 * r3795139;
        double r3795141 = r3795135 + r3795140;
        double r3795142 = r3795134 / r3795141;
        double r3795143 = r3795142 - r3795131;
        double r3795144 = r3795129 * r3795143;
        return r3795144;
}

double f(double x) {
        double r3795145 = 0.27061;
        double r3795146 = x;
        double r3795147 = 2.30753;
        double r3795148 = fma(r3795145, r3795146, r3795147);
        double r3795149 = 0.04481;
        double r3795150 = 0.99229;
        double r3795151 = fma(r3795146, r3795149, r3795150);
        double r3795152 = 1.0;
        double r3795153 = fma(r3795146, r3795151, r3795152);
        double r3795154 = r3795148 / r3795153;
        double r3795155 = r3795154 - r3795146;
        double r3795156 = 0.70711;
        double r3795157 = r3795155 * r3795156;
        return r3795157;
}

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(x, \mathsf{fma}\left(x, 0.04481000000000000260680366181986755691469, 0.992290000000000005364597654988756403327\right), 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(x, \mathsf{fma}\left(x, 0.04481000000000000260680366181986755691469, 0.992290000000000005364597654988756403327\right), 1\right)} - x\right) \cdot 0.7071100000000000163069557856942992657423\]

Reproduce

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