Average Error: 0.0 → 0.0
Time: 14.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 r2610545 = 0.70711;
        double r2610546 = 2.30753;
        double r2610547 = x;
        double r2610548 = 0.27061;
        double r2610549 = r2610547 * r2610548;
        double r2610550 = r2610546 + r2610549;
        double r2610551 = 1.0;
        double r2610552 = 0.99229;
        double r2610553 = 0.04481;
        double r2610554 = r2610547 * r2610553;
        double r2610555 = r2610552 + r2610554;
        double r2610556 = r2610547 * r2610555;
        double r2610557 = r2610551 + r2610556;
        double r2610558 = r2610550 / r2610557;
        double r2610559 = r2610558 - r2610547;
        double r2610560 = r2610545 * r2610559;
        return r2610560;
}

double f(double x) {
        double r2610561 = 0.27061;
        double r2610562 = x;
        double r2610563 = 2.30753;
        double r2610564 = fma(r2610561, r2610562, r2610563);
        double r2610565 = 0.04481;
        double r2610566 = 0.99229;
        double r2610567 = fma(r2610562, r2610565, r2610566);
        double r2610568 = 1.0;
        double r2610569 = fma(r2610562, r2610567, r2610568);
        double r2610570 = r2610564 / r2610569;
        double r2610571 = r2610570 - r2610562;
        double r2610572 = 0.70711;
        double r2610573 = r2610571 * r2610572;
        return r2610573;
}

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