Average Error: 0.0 → 0.0
Time: 35.4s
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)\]
\[\frac{\mathsf{fma}\left(0.2706100000000000171951342053944244980812, x, 2.307529999999999859028321225196123123169\right) \cdot 0.7071100000000000163069557856942992657423}{\mathsf{fma}\left(x, \mathsf{fma}\left(0.04481000000000000260680366181986755691469, x, 0.992290000000000005364597654988756403327\right), 1\right)} + 0.7071100000000000163069557856942992657423 \cdot \left(-x\right)\]
0.7071100000000000163069557856942992657423 \cdot \left(\frac{2.307529999999999859028321225196123123169 + x \cdot 0.2706100000000000171951342053944244980812}{1 + x \cdot \left(0.992290000000000005364597654988756403327 + x \cdot 0.04481000000000000260680366181986755691469\right)} - x\right)
\frac{\mathsf{fma}\left(0.2706100000000000171951342053944244980812, x, 2.307529999999999859028321225196123123169\right) \cdot 0.7071100000000000163069557856942992657423}{\mathsf{fma}\left(x, \mathsf{fma}\left(0.04481000000000000260680366181986755691469, x, 0.992290000000000005364597654988756403327\right), 1\right)} + 0.7071100000000000163069557856942992657423 \cdot \left(-x\right)
double f(double x) {
        double r70949 = 0.70711;
        double r70950 = 2.30753;
        double r70951 = x;
        double r70952 = 0.27061;
        double r70953 = r70951 * r70952;
        double r70954 = r70950 + r70953;
        double r70955 = 1.0;
        double r70956 = 0.99229;
        double r70957 = 0.04481;
        double r70958 = r70951 * r70957;
        double r70959 = r70956 + r70958;
        double r70960 = r70951 * r70959;
        double r70961 = r70955 + r70960;
        double r70962 = r70954 / r70961;
        double r70963 = r70962 - r70951;
        double r70964 = r70949 * r70963;
        return r70964;
}

double f(double x) {
        double r70965 = 0.27061;
        double r70966 = x;
        double r70967 = 2.30753;
        double r70968 = fma(r70965, r70966, r70967);
        double r70969 = 0.70711;
        double r70970 = r70968 * r70969;
        double r70971 = 0.04481;
        double r70972 = 0.99229;
        double r70973 = fma(r70971, r70966, r70972);
        double r70974 = 1.0;
        double r70975 = fma(r70966, r70973, r70974);
        double r70976 = r70970 / r70975;
        double r70977 = -r70966;
        double r70978 = r70969 * r70977;
        double r70979 = r70976 + r70978;
        return r70979;
}

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. Using strategy rm
  3. Applied sub-neg0.0

    \[\leadsto 0.7071100000000000163069557856942992657423 \cdot \color{blue}{\left(\frac{2.307529999999999859028321225196123123169 + x \cdot 0.2706100000000000171951342053944244980812}{1 + x \cdot \left(0.992290000000000005364597654988756403327 + x \cdot 0.04481000000000000260680366181986755691469\right)} + \left(-x\right)\right)}\]
  4. Applied distribute-lft-in0.0

    \[\leadsto \color{blue}{0.7071100000000000163069557856942992657423 \cdot \frac{2.307529999999999859028321225196123123169 + x \cdot 0.2706100000000000171951342053944244980812}{1 + x \cdot \left(0.992290000000000005364597654988756403327 + x \cdot 0.04481000000000000260680366181986755691469\right)} + 0.7071100000000000163069557856942992657423 \cdot \left(-x\right)}\]
  5. Simplified0.0

    \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(0.2706100000000000171951342053944244980812, x, 2.307529999999999859028321225196123123169\right) \cdot 0.7071100000000000163069557856942992657423}{\mathsf{fma}\left(x, \mathsf{fma}\left(0.04481000000000000260680366181986755691469, x, 0.992290000000000005364597654988756403327\right), 1\right)}} + 0.7071100000000000163069557856942992657423 \cdot \left(-x\right)\]
  6. Final simplification0.0

    \[\leadsto \frac{\mathsf{fma}\left(0.2706100000000000171951342053944244980812, x, 2.307529999999999859028321225196123123169\right) \cdot 0.7071100000000000163069557856942992657423}{\mathsf{fma}\left(x, \mathsf{fma}\left(0.04481000000000000260680366181986755691469, x, 0.992290000000000005364597654988756403327\right), 1\right)} + 0.7071100000000000163069557856942992657423 \cdot \left(-x\right)\]

Reproduce

herbie shell --seed 2019326 +o rules:numerics
(FPCore (x)
  :name "Numeric.SpecFunctions:invErfc from math-functions-0.1.5.2, B"
  :precision binary64
  (* 0.70711 (- (/ (+ 2.30753 (* x 0.27061)) (+ 1 (* x (+ 0.99229 (* x 0.04481))))) x)))