Average Error: 0.0 → 0.0
Time: 11.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)\]
\[\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 r3686391 = 0.70711;
        double r3686392 = 2.30753;
        double r3686393 = x;
        double r3686394 = 0.27061;
        double r3686395 = r3686393 * r3686394;
        double r3686396 = r3686392 + r3686395;
        double r3686397 = 1.0;
        double r3686398 = 0.99229;
        double r3686399 = 0.04481;
        double r3686400 = r3686393 * r3686399;
        double r3686401 = r3686398 + r3686400;
        double r3686402 = r3686393 * r3686401;
        double r3686403 = r3686397 + r3686402;
        double r3686404 = r3686396 / r3686403;
        double r3686405 = r3686404 - r3686393;
        double r3686406 = r3686391 * r3686405;
        return r3686406;
}

double f(double x) {
        double r3686407 = 0.27061;
        double r3686408 = x;
        double r3686409 = 2.30753;
        double r3686410 = fma(r3686407, r3686408, r3686409);
        double r3686411 = 0.04481;
        double r3686412 = 0.99229;
        double r3686413 = fma(r3686408, r3686411, r3686412);
        double r3686414 = 1.0;
        double r3686415 = fma(r3686408, r3686413, r3686414);
        double r3686416 = r3686410 / r3686415;
        double r3686417 = r3686416 - r3686408;
        double r3686418 = 0.70711;
        double r3686419 = r3686417 * r3686418;
        return r3686419;
}

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. 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)))