Average Error: 0.0 → 0.0
Time: 15.0s
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)\]
\[0.7071100000000000163069557856942992657423 \cdot \left(-x\right) + \frac{\mathsf{fma}\left(0.1913510371000000098717919172486290335655, x, 1.631677538299999952187135932035744190216\right)}{\mathsf{fma}\left(x, \mathsf{fma}\left(0.04481000000000000260680366181986755691469, x, 0.992290000000000005364597654988756403327\right), 1\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)
0.7071100000000000163069557856942992657423 \cdot \left(-x\right) + \frac{\mathsf{fma}\left(0.1913510371000000098717919172486290335655, x, 1.631677538299999952187135932035744190216\right)}{\mathsf{fma}\left(x, \mathsf{fma}\left(0.04481000000000000260680366181986755691469, x, 0.992290000000000005364597654988756403327\right), 1\right)}
double f(double x) {
        double r117241 = 0.70711;
        double r117242 = 2.30753;
        double r117243 = x;
        double r117244 = 0.27061;
        double r117245 = r117243 * r117244;
        double r117246 = r117242 + r117245;
        double r117247 = 1.0;
        double r117248 = 0.99229;
        double r117249 = 0.04481;
        double r117250 = r117243 * r117249;
        double r117251 = r117248 + r117250;
        double r117252 = r117243 * r117251;
        double r117253 = r117247 + r117252;
        double r117254 = r117246 / r117253;
        double r117255 = r117254 - r117243;
        double r117256 = r117241 * r117255;
        return r117256;
}

double f(double x) {
        double r117257 = 0.70711;
        double r117258 = x;
        double r117259 = -r117258;
        double r117260 = r117257 * r117259;
        double r117261 = 0.1913510371;
        double r117262 = 1.6316775383;
        double r117263 = fma(r117261, r117258, r117262);
        double r117264 = 0.04481;
        double r117265 = 0.99229;
        double r117266 = fma(r117264, r117258, r117265);
        double r117267 = 1.0;
        double r117268 = fma(r117258, r117266, r117267);
        double r117269 = r117263 / r117268;
        double r117270 = r117260 + r117269;
        return r117270;
}

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

    \[\leadsto 0.7071100000000000163069557856942992657423 \cdot \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)} + \left(-x\right)\right)}\]
  5. Applied distribute-lft-in0.0

    \[\leadsto \color{blue}{0.7071100000000000163069557856942992657423 \cdot \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)} + 0.7071100000000000163069557856942992657423 \cdot \left(-x\right)}\]
  6. 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)\]
  7. Taylor expanded around 0 0.0

    \[\leadsto \frac{\color{blue}{0.1913510371000000098717919172486290335655 \cdot x + 1.631677538299999952187135932035744190216}}{\mathsf{fma}\left(x, \mathsf{fma}\left(0.04481000000000000260680366181986755691469, x, 0.992290000000000005364597654988756403327\right), 1\right)} + 0.7071100000000000163069557856942992657423 \cdot \left(-x\right)\]
  8. Simplified0.0

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

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

Reproduce

herbie shell --seed 2019194 +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)))