Average Error: 0.0 → 0.0
Time: 8.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)\]
\[\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 r3059049 = 0.70711;
        double r3059050 = 2.30753;
        double r3059051 = x;
        double r3059052 = 0.27061;
        double r3059053 = r3059051 * r3059052;
        double r3059054 = r3059050 + r3059053;
        double r3059055 = 1.0;
        double r3059056 = 0.99229;
        double r3059057 = 0.04481;
        double r3059058 = r3059051 * r3059057;
        double r3059059 = r3059056 + r3059058;
        double r3059060 = r3059051 * r3059059;
        double r3059061 = r3059055 + r3059060;
        double r3059062 = r3059054 / r3059061;
        double r3059063 = r3059062 - r3059051;
        double r3059064 = r3059049 * r3059063;
        return r3059064;
}

double f(double x) {
        double r3059065 = 0.27061;
        double r3059066 = x;
        double r3059067 = 2.30753;
        double r3059068 = fma(r3059065, r3059066, r3059067);
        double r3059069 = 0.04481;
        double r3059070 = 0.99229;
        double r3059071 = fma(r3059066, r3059069, r3059070);
        double r3059072 = 1.0;
        double r3059073 = fma(r3059066, r3059071, r3059072);
        double r3059074 = r3059068 / r3059073;
        double r3059075 = r3059074 - r3059066;
        double r3059076 = 0.70711;
        double r3059077 = r3059075 * r3059076;
        return r3059077;
}

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