Average Error: 0.0 → 0.0
Time: 20.1s
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)\]
\[\frac{0.7071100000000000163069557856942992657423 \cdot \mathsf{fma}\left(x, 0.2706100000000000171951342053944244980812, 2.307529999999999859028321225196123123169\right)}{\mathsf{fma}\left(x, \mathsf{fma}\left(x, 0.04481000000000000260680366181986755691469, 0.992290000000000005364597654988756403327\right), 1\right)} + \left(-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)
\frac{0.7071100000000000163069557856942992657423 \cdot \mathsf{fma}\left(x, 0.2706100000000000171951342053944244980812, 2.307529999999999859028321225196123123169\right)}{\mathsf{fma}\left(x, \mathsf{fma}\left(x, 0.04481000000000000260680366181986755691469, 0.992290000000000005364597654988756403327\right), 1\right)} + \left(-x\right) \cdot 0.7071100000000000163069557856942992657423
double f(double x) {
        double r5441299 = 0.70711;
        double r5441300 = 2.30753;
        double r5441301 = x;
        double r5441302 = 0.27061;
        double r5441303 = r5441301 * r5441302;
        double r5441304 = r5441300 + r5441303;
        double r5441305 = 1.0;
        double r5441306 = 0.99229;
        double r5441307 = 0.04481;
        double r5441308 = r5441301 * r5441307;
        double r5441309 = r5441306 + r5441308;
        double r5441310 = r5441301 * r5441309;
        double r5441311 = r5441305 + r5441310;
        double r5441312 = r5441304 / r5441311;
        double r5441313 = r5441312 - r5441301;
        double r5441314 = r5441299 * r5441313;
        return r5441314;
}

double f(double x) {
        double r5441315 = 0.70711;
        double r5441316 = x;
        double r5441317 = 0.27061;
        double r5441318 = 2.30753;
        double r5441319 = fma(r5441316, r5441317, r5441318);
        double r5441320 = r5441315 * r5441319;
        double r5441321 = 0.04481;
        double r5441322 = 0.99229;
        double r5441323 = fma(r5441316, r5441321, r5441322);
        double r5441324 = 1.0;
        double r5441325 = fma(r5441316, r5441323, r5441324);
        double r5441326 = r5441320 / r5441325;
        double r5441327 = -r5441316;
        double r5441328 = r5441327 * r5441315;
        double r5441329 = r5441326 + r5441328;
        return r5441329;
}

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-rgt-in0.0

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

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

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

Reproduce

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