Average Error: 0.0 → 0.0
Time: 18.0s
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(0.707110000000000016, \frac{\mathsf{fma}\left(0.27061000000000002, x, 2.30753\right)}{\mathsf{fma}\left(x, \mathsf{fma}\left(0.044810000000000003, x, 0.992290000000000005\right), 1\right)}, \left(-x\right) \cdot 0.707110000000000016\right)\]
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(0.707110000000000016, \frac{\mathsf{fma}\left(0.27061000000000002, x, 2.30753\right)}{\mathsf{fma}\left(x, \mathsf{fma}\left(0.044810000000000003, x, 0.992290000000000005\right), 1\right)}, \left(-x\right) \cdot 0.707110000000000016\right)
double f(double x) {
        double r81713 = 0.70711;
        double r81714 = 2.30753;
        double r81715 = x;
        double r81716 = 0.27061;
        double r81717 = r81715 * r81716;
        double r81718 = r81714 + r81717;
        double r81719 = 1.0;
        double r81720 = 0.99229;
        double r81721 = 0.04481;
        double r81722 = r81715 * r81721;
        double r81723 = r81720 + r81722;
        double r81724 = r81715 * r81723;
        double r81725 = r81719 + r81724;
        double r81726 = r81718 / r81725;
        double r81727 = r81726 - r81715;
        double r81728 = r81713 * r81727;
        return r81728;
}

double f(double x) {
        double r81729 = 0.70711;
        double r81730 = 0.27061;
        double r81731 = x;
        double r81732 = 2.30753;
        double r81733 = fma(r81730, r81731, r81732);
        double r81734 = 0.04481;
        double r81735 = 0.99229;
        double r81736 = fma(r81734, r81731, r81735);
        double r81737 = 1.0;
        double r81738 = fma(r81731, r81736, r81737);
        double r81739 = r81733 / r81738;
        double r81740 = -r81731;
        double r81741 = r81740 * r81729;
        double r81742 = fma(r81729, r81739, r81741);
        return r81742;
}

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. Using strategy rm
  3. Applied div-inv0.0

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

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

    \[\leadsto 0.707110000000000016 \cdot \color{blue}{\left(\left(2.30753 + x \cdot 0.27061000000000002\right) \cdot \frac{1}{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)} + \left(-x\right)\right)}\]
  7. Applied distribute-lft-in0.0

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

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

    \[\leadsto 0.707110000000000016 \cdot \frac{\mathsf{fma}\left(0.27061000000000002, x, 2.30753\right)}{\mathsf{fma}\left(x, \mathsf{fma}\left(0.044810000000000003, x, 0.992290000000000005\right), 1\right)} + \color{blue}{\left(-x\right) \cdot 0.707110000000000016}\]
  10. Using strategy rm
  11. Applied fma-def0.0

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

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

Reproduce

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