Average Error: 0.0 → 0.0
Time: 32.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)\]
\[0.7071100000000000163069557856942992657423 \cdot \frac{\mathsf{fma}\left(x, 0.2706100000000000171951342053944244980812, 2.307529999999999859028321225196123123169\right)}{\mathsf{fma}\left(\mathsf{fma}\left(0.04481000000000000260680366181986755691469, x, 0.992290000000000005364597654988756403327\right), x, 1\right)} + 0.7071100000000000163069557856942992657423 \cdot \left(-x\right)\]
0.7071100000000000163069557856942992657423 \cdot \left(\frac{2.307529999999999859028321225196123123169 + x \cdot 0.2706100000000000171951342053944244980812}{1 + x \cdot \left(0.992290000000000005364597654988756403327 + x \cdot 0.04481000000000000260680366181986755691469\right)} - x\right)
0.7071100000000000163069557856942992657423 \cdot \frac{\mathsf{fma}\left(x, 0.2706100000000000171951342053944244980812, 2.307529999999999859028321225196123123169\right)}{\mathsf{fma}\left(\mathsf{fma}\left(0.04481000000000000260680366181986755691469, x, 0.992290000000000005364597654988756403327\right), x, 1\right)} + 0.7071100000000000163069557856942992657423 \cdot \left(-x\right)
double f(double x) {
        double r97187 = 0.70711;
        double r97188 = 2.30753;
        double r97189 = x;
        double r97190 = 0.27061;
        double r97191 = r97189 * r97190;
        double r97192 = r97188 + r97191;
        double r97193 = 1.0;
        double r97194 = 0.99229;
        double r97195 = 0.04481;
        double r97196 = r97189 * r97195;
        double r97197 = r97194 + r97196;
        double r97198 = r97189 * r97197;
        double r97199 = r97193 + r97198;
        double r97200 = r97192 / r97199;
        double r97201 = r97200 - r97189;
        double r97202 = r97187 * r97201;
        return r97202;
}

double f(double x) {
        double r97203 = 0.70711;
        double r97204 = x;
        double r97205 = 0.27061;
        double r97206 = 2.30753;
        double r97207 = fma(r97204, r97205, r97206);
        double r97208 = 0.04481;
        double r97209 = 0.99229;
        double r97210 = fma(r97208, r97204, r97209);
        double r97211 = 1.0;
        double r97212 = fma(r97210, r97204, r97211);
        double r97213 = r97207 / r97212;
        double r97214 = r97203 * r97213;
        double r97215 = -r97204;
        double r97216 = r97203 * r97215;
        double r97217 = r97214 + r97216;
        return r97217;
}

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. Using strategy rm
  3. Applied sub-neg0.0

    \[\leadsto 0.7071100000000000163069557856942992657423 \cdot \color{blue}{\left(\frac{2.307529999999999859028321225196123123169 + x \cdot 0.2706100000000000171951342053944244980812}{1 + x \cdot \left(0.992290000000000005364597654988756403327 + x \cdot 0.04481000000000000260680366181986755691469\right)} + \left(-x\right)\right)}\]
  4. Applied distribute-lft-in0.0

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

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

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

Reproduce

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