Average Error: 0.0 → 0.0
Time: 20.9s
Precision: 64
\[0.707110000000000016 \cdot \left(\frac{2.30753 + x \cdot 0.27061000000000002}{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)} - x\right)\]
\[\mathsf{fma}\left(\mathsf{fma}\left(0.27061000000000002, x, 2.30753\right), \frac{1}{\mathsf{fma}\left(\mathsf{fma}\left(0.044810000000000003, x, 0.992290000000000005\right), x, 1\right)}, -x\right) \cdot 0.707110000000000016\]
0.707110000000000016 \cdot \left(\frac{2.30753 + x \cdot 0.27061000000000002}{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)} - x\right)
\mathsf{fma}\left(\mathsf{fma}\left(0.27061000000000002, x, 2.30753\right), \frac{1}{\mathsf{fma}\left(\mathsf{fma}\left(0.044810000000000003, x, 0.992290000000000005\right), x, 1\right)}, -x\right) \cdot 0.707110000000000016
double f(double x) {
        double r82507 = 0.70711;
        double r82508 = 2.30753;
        double r82509 = x;
        double r82510 = 0.27061;
        double r82511 = r82509 * r82510;
        double r82512 = r82508 + r82511;
        double r82513 = 1.0;
        double r82514 = 0.99229;
        double r82515 = 0.04481;
        double r82516 = r82509 * r82515;
        double r82517 = r82514 + r82516;
        double r82518 = r82509 * r82517;
        double r82519 = r82513 + r82518;
        double r82520 = r82512 / r82519;
        double r82521 = r82520 - r82509;
        double r82522 = r82507 * r82521;
        return r82522;
}

double f(double x) {
        double r82523 = 0.27061;
        double r82524 = x;
        double r82525 = 2.30753;
        double r82526 = fma(r82523, r82524, r82525);
        double r82527 = 1.0;
        double r82528 = 0.04481;
        double r82529 = 0.99229;
        double r82530 = fma(r82528, r82524, r82529);
        double r82531 = 1.0;
        double r82532 = fma(r82530, r82524, r82531);
        double r82533 = r82527 / r82532;
        double r82534 = -r82524;
        double r82535 = fma(r82526, r82533, r82534);
        double r82536 = 0.70711;
        double r82537 = r82535 * r82536;
        return r82537;
}

Error

Bits error versus x

Derivation

  1. Initial program 0.0

    \[0.707110000000000016 \cdot \left(\frac{2.30753 + x \cdot 0.27061000000000002}{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)} - x\right)\]
  2. Simplified0.0

    \[\leadsto \color{blue}{\left(\frac{\mathsf{fma}\left(0.27061000000000002, x, 2.30753\right)}{\mathsf{fma}\left(\mathsf{fma}\left(0.044810000000000003, x, 0.992290000000000005\right), x, 1\right)} - x\right) \cdot 0.707110000000000016}\]
  3. Using strategy rm
  4. Applied div-inv0.0

    \[\leadsto \left(\color{blue}{\mathsf{fma}\left(0.27061000000000002, x, 2.30753\right) \cdot \frac{1}{\mathsf{fma}\left(\mathsf{fma}\left(0.044810000000000003, x, 0.992290000000000005\right), x, 1\right)}} - x\right) \cdot 0.707110000000000016\]
  5. Applied fma-neg0.0

    \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(0.27061000000000002, x, 2.30753\right), \frac{1}{\mathsf{fma}\left(\mathsf{fma}\left(0.044810000000000003, x, 0.992290000000000005\right), x, 1\right)}, -x\right)} \cdot 0.707110000000000016\]
  6. Final simplification0.0

    \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(0.27061000000000002, x, 2.30753\right), \frac{1}{\mathsf{fma}\left(\mathsf{fma}\left(0.044810000000000003, x, 0.992290000000000005\right), x, 1\right)}, -x\right) \cdot 0.707110000000000016\]

Reproduce

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