Average Error: 0.0 → 0.1
Time: 4.8s
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{\sqrt[3]{\frac{1}{{\left(\sqrt{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)}\right)}^{3}}} \cdot \mathsf{fma}\left(0.27061000000000002, x, 2.30753\right)}{\sqrt{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)}}, 0.707110000000000016 \cdot \left(-x\right)\right) + 0.707110000000000016 \cdot \mathsf{fma}\left(-x, 1, x\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{\sqrt[3]{\frac{1}{{\left(\sqrt{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)}\right)}^{3}}} \cdot \mathsf{fma}\left(0.27061000000000002, x, 2.30753\right)}{\sqrt{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)}}, 0.707110000000000016 \cdot \left(-x\right)\right) + 0.707110000000000016 \cdot \mathsf{fma}\left(-x, 1, x\right)
double f(double x) {
        double r147427 = 0.70711;
        double r147428 = 2.30753;
        double r147429 = x;
        double r147430 = 0.27061;
        double r147431 = r147429 * r147430;
        double r147432 = r147428 + r147431;
        double r147433 = 1.0;
        double r147434 = 0.99229;
        double r147435 = 0.04481;
        double r147436 = r147429 * r147435;
        double r147437 = r147434 + r147436;
        double r147438 = r147429 * r147437;
        double r147439 = r147433 + r147438;
        double r147440 = r147432 / r147439;
        double r147441 = r147440 - r147429;
        double r147442 = r147427 * r147441;
        return r147442;
}

double f(double x) {
        double r147443 = 0.70711;
        double r147444 = 1.0;
        double r147445 = 1.0;
        double r147446 = x;
        double r147447 = 0.99229;
        double r147448 = 0.04481;
        double r147449 = r147446 * r147448;
        double r147450 = r147447 + r147449;
        double r147451 = r147446 * r147450;
        double r147452 = r147445 + r147451;
        double r147453 = sqrt(r147452);
        double r147454 = 3.0;
        double r147455 = pow(r147453, r147454);
        double r147456 = r147444 / r147455;
        double r147457 = cbrt(r147456);
        double r147458 = 0.27061;
        double r147459 = 2.30753;
        double r147460 = fma(r147458, r147446, r147459);
        double r147461 = r147457 * r147460;
        double r147462 = r147461 / r147453;
        double r147463 = -r147446;
        double r147464 = r147443 * r147463;
        double r147465 = fma(r147443, r147462, r147464);
        double r147466 = fma(r147463, r147444, r147446);
        double r147467 = r147443 * r147466;
        double r147468 = r147465 + r147467;
        return r147468;
}

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 add-cube-cbrt0.6

    \[\leadsto 0.707110000000000016 \cdot \left(\frac{2.30753 + x \cdot 0.27061000000000002}{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)} - \color{blue}{\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \sqrt[3]{x}}\right)\]
  4. Applied add-sqr-sqrt0.7

    \[\leadsto 0.707110000000000016 \cdot \left(\frac{2.30753 + x \cdot 0.27061000000000002}{\color{blue}{\sqrt{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)} \cdot \sqrt{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)}}} - \left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \sqrt[3]{x}\right)\]
  5. Applied *-un-lft-identity0.7

    \[\leadsto 0.707110000000000016 \cdot \left(\frac{\color{blue}{1 \cdot \left(2.30753 + x \cdot 0.27061000000000002\right)}}{\sqrt{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)} \cdot \sqrt{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)}} - \left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \sqrt[3]{x}\right)\]
  6. Applied times-frac0.7

    \[\leadsto 0.707110000000000016 \cdot \left(\color{blue}{\frac{1}{\sqrt{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)}} \cdot \frac{2.30753 + x \cdot 0.27061000000000002}{\sqrt{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)}}} - \left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \sqrt[3]{x}\right)\]
  7. Applied prod-diff0.7

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

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

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

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

    \[\leadsto \mathsf{fma}\left(0.707110000000000016, \frac{\frac{1}{\color{blue}{\sqrt[3]{\left(\sqrt{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)} \cdot \sqrt{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)}\right) \cdot \sqrt{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)}}}} \cdot \mathsf{fma}\left(0.27061000000000002, x, 2.30753\right)}{\sqrt{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)}}, 0.707110000000000016 \cdot \left(-x\right)\right) + 0.707110000000000016 \cdot \mathsf{fma}\left(-x, 1, x\right)\]
  13. Applied add-cbrt-cube0.1

    \[\leadsto \mathsf{fma}\left(0.707110000000000016, \frac{\frac{\color{blue}{\sqrt[3]{\left(1 \cdot 1\right) \cdot 1}}}{\sqrt[3]{\left(\sqrt{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)} \cdot \sqrt{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)}\right) \cdot \sqrt{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)}}} \cdot \mathsf{fma}\left(0.27061000000000002, x, 2.30753\right)}{\sqrt{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)}}, 0.707110000000000016 \cdot \left(-x\right)\right) + 0.707110000000000016 \cdot \mathsf{fma}\left(-x, 1, x\right)\]
  14. Applied cbrt-undiv0.1

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

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

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

Reproduce

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