Average Error: 0.0 → 0.0
Time: 11.2s
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(\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, \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(\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, \left(-x\right) \cdot 0.707110000000000016\right)
double f(double x) {
        double r97956 = 0.70711;
        double r97957 = 2.30753;
        double r97958 = x;
        double r97959 = 0.27061;
        double r97960 = r97958 * r97959;
        double r97961 = r97957 + r97960;
        double r97962 = 1.0;
        double r97963 = 0.99229;
        double r97964 = 0.04481;
        double r97965 = r97958 * r97964;
        double r97966 = r97963 + r97965;
        double r97967 = r97958 * r97966;
        double r97968 = r97962 + r97967;
        double r97969 = r97961 / r97968;
        double r97970 = r97969 - r97958;
        double r97971 = r97956 * r97970;
        return r97971;
}

double f(double x) {
        double r97972 = 0.27061;
        double r97973 = x;
        double r97974 = 2.30753;
        double r97975 = fma(r97972, r97973, r97974);
        double r97976 = 0.04481;
        double r97977 = 0.99229;
        double r97978 = fma(r97976, r97973, r97977);
        double r97979 = 1.0;
        double r97980 = fma(r97973, r97978, r97979);
        double r97981 = r97975 / r97980;
        double r97982 = 0.70711;
        double r97983 = -r97973;
        double r97984 = r97983 * r97982;
        double r97985 = fma(r97981, r97982, r97984);
        return r97985;
}

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 sub-neg0.0

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

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

    \[\leadsto \color{blue}{\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)} \cdot 0.707110000000000016} + 0.707110000000000016 \cdot \left(-x\right)\]
  6. Simplified0.0

    \[\leadsto \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)} \cdot 0.707110000000000016 + \color{blue}{\left(-x\right) \cdot 0.707110000000000016}\]
  7. Using strategy rm
  8. Applied fma-def0.0

    \[\leadsto \color{blue}{\mathsf{fma}\left(\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, \left(-x\right) \cdot 0.707110000000000016\right)}\]
  9. Final simplification0.0

    \[\leadsto \mathsf{fma}\left(\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, \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)))