Average Error: 0.0 → 0.0
Time: 12.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 r64981 = 0.70711;
        double r64982 = 2.30753;
        double r64983 = x;
        double r64984 = 0.27061;
        double r64985 = r64983 * r64984;
        double r64986 = r64982 + r64985;
        double r64987 = 1.0;
        double r64988 = 0.99229;
        double r64989 = 0.04481;
        double r64990 = r64983 * r64989;
        double r64991 = r64988 + r64990;
        double r64992 = r64983 * r64991;
        double r64993 = r64987 + r64992;
        double r64994 = r64986 / r64993;
        double r64995 = r64994 - r64983;
        double r64996 = r64981 * r64995;
        return r64996;
}

double f(double x) {
        double r64997 = 0.27061;
        double r64998 = x;
        double r64999 = 2.30753;
        double r65000 = fma(r64997, r64998, r64999);
        double r65001 = 0.04481;
        double r65002 = 0.99229;
        double r65003 = fma(r64998, r65001, r65002);
        double r65004 = 1.0;
        double r65005 = fma(r64998, r65003, r65004);
        double r65006 = r65000 / r65005;
        double r65007 = r65006 - r64998;
        double r65008 = 0.70711;
        double r65009 = r65007 * r65008;
        return r65009;
}

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