Average Error: 0.0 → 0.0
Time: 15.3s
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 r4012982 = 0.70711;
        double r4012983 = 2.30753;
        double r4012984 = x;
        double r4012985 = 0.27061;
        double r4012986 = r4012984 * r4012985;
        double r4012987 = r4012983 + r4012986;
        double r4012988 = 1.0;
        double r4012989 = 0.99229;
        double r4012990 = 0.04481;
        double r4012991 = r4012984 * r4012990;
        double r4012992 = r4012989 + r4012991;
        double r4012993 = r4012984 * r4012992;
        double r4012994 = r4012988 + r4012993;
        double r4012995 = r4012987 / r4012994;
        double r4012996 = r4012995 - r4012984;
        double r4012997 = r4012982 * r4012996;
        return r4012997;
}

double f(double x) {
        double r4012998 = 0.27061;
        double r4012999 = x;
        double r4013000 = 2.30753;
        double r4013001 = fma(r4012998, r4012999, r4013000);
        double r4013002 = 0.04481;
        double r4013003 = 0.99229;
        double r4013004 = fma(r4012999, r4013002, r4013003);
        double r4013005 = 1.0;
        double r4013006 = fma(r4012999, r4013004, r4013005);
        double r4013007 = r4013001 / r4013006;
        double r4013008 = r4013007 - r4012999;
        double r4013009 = 0.70711;
        double r4013010 = r4013008 * r4013009;
        return r4013010;
}

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