Average Error: 15.9 → 15.4
Time: 4.1s
Precision: 64
\[1 - \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}\]
\[\frac{\frac{1 \cdot \left(\left({1}^{3} - {0.5}^{3}\right) \cdot \mathsf{hypot}\left(1, x\right) - 0.5 \cdot \left(0.5 \cdot \left(0.5 + 1\right) + 1 \cdot 1\right)\right)}{\mathsf{hypot}\left(1, x\right) \cdot \left(0.5 \cdot \left(0.5 + 1\right) + 1 \cdot 1\right)}}{1 + \sqrt{0.5 \cdot \left(\left(\sqrt[3]{1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}} \cdot \frac{\sqrt[3]{{1}^{3} + {\left(\frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}^{3}}}{\sqrt[3]{1 \cdot 1 + \left(\frac{1}{\mathsf{hypot}\left(1, x\right)} \cdot \frac{1}{\mathsf{hypot}\left(1, x\right)} - 1 \cdot \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}}\right) \cdot \sqrt[3]{1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}}\right)}}\]
1 - \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}
\frac{\frac{1 \cdot \left(\left({1}^{3} - {0.5}^{3}\right) \cdot \mathsf{hypot}\left(1, x\right) - 0.5 \cdot \left(0.5 \cdot \left(0.5 + 1\right) + 1 \cdot 1\right)\right)}{\mathsf{hypot}\left(1, x\right) \cdot \left(0.5 \cdot \left(0.5 + 1\right) + 1 \cdot 1\right)}}{1 + \sqrt{0.5 \cdot \left(\left(\sqrt[3]{1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}} \cdot \frac{\sqrt[3]{{1}^{3} + {\left(\frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}^{3}}}{\sqrt[3]{1 \cdot 1 + \left(\frac{1}{\mathsf{hypot}\left(1, x\right)} \cdot \frac{1}{\mathsf{hypot}\left(1, x\right)} - 1 \cdot \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}}\right) \cdot \sqrt[3]{1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}}\right)}}
double f(double x) {
        double r168839 = 1.0;
        double r168840 = 0.5;
        double r168841 = x;
        double r168842 = hypot(r168839, r168841);
        double r168843 = r168839 / r168842;
        double r168844 = r168839 + r168843;
        double r168845 = r168840 * r168844;
        double r168846 = sqrt(r168845);
        double r168847 = r168839 - r168846;
        return r168847;
}

double f(double x) {
        double r168848 = 1.0;
        double r168849 = 3.0;
        double r168850 = pow(r168848, r168849);
        double r168851 = 0.5;
        double r168852 = pow(r168851, r168849);
        double r168853 = r168850 - r168852;
        double r168854 = x;
        double r168855 = hypot(r168848, r168854);
        double r168856 = r168853 * r168855;
        double r168857 = r168851 + r168848;
        double r168858 = r168851 * r168857;
        double r168859 = r168848 * r168848;
        double r168860 = r168858 + r168859;
        double r168861 = r168851 * r168860;
        double r168862 = r168856 - r168861;
        double r168863 = r168848 * r168862;
        double r168864 = r168855 * r168860;
        double r168865 = r168863 / r168864;
        double r168866 = r168848 / r168855;
        double r168867 = r168848 + r168866;
        double r168868 = cbrt(r168867);
        double r168869 = pow(r168866, r168849);
        double r168870 = r168850 + r168869;
        double r168871 = cbrt(r168870);
        double r168872 = r168866 * r168866;
        double r168873 = r168848 * r168866;
        double r168874 = r168872 - r168873;
        double r168875 = r168859 + r168874;
        double r168876 = cbrt(r168875);
        double r168877 = r168871 / r168876;
        double r168878 = r168868 * r168877;
        double r168879 = r168878 * r168868;
        double r168880 = r168851 * r168879;
        double r168881 = sqrt(r168880);
        double r168882 = r168848 + r168881;
        double r168883 = r168865 / r168882;
        return r168883;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 15.9

    \[1 - \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}\]
  2. Using strategy rm
  3. Applied flip--15.9

    \[\leadsto \color{blue}{\frac{1 \cdot 1 - \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)} \cdot \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}}{1 + \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}}}\]
  4. Simplified15.4

    \[\leadsto \frac{\color{blue}{1 \cdot \left(1 - 0.5\right) - 0.5 \cdot \frac{1}{\mathsf{hypot}\left(1, x\right)}}}{1 + \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}}\]
  5. Using strategy rm
  6. Applied associate-*r/15.4

    \[\leadsto \frac{1 \cdot \left(1 - 0.5\right) - \color{blue}{\frac{0.5 \cdot 1}{\mathsf{hypot}\left(1, x\right)}}}{1 + \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}}\]
  7. Applied flip3--15.4

    \[\leadsto \frac{1 \cdot \color{blue}{\frac{{1}^{3} - {0.5}^{3}}{1 \cdot 1 + \left(0.5 \cdot 0.5 + 1 \cdot 0.5\right)}} - \frac{0.5 \cdot 1}{\mathsf{hypot}\left(1, x\right)}}{1 + \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}}\]
  8. Applied associate-*r/15.4

    \[\leadsto \frac{\color{blue}{\frac{1 \cdot \left({1}^{3} - {0.5}^{3}\right)}{1 \cdot 1 + \left(0.5 \cdot 0.5 + 1 \cdot 0.5\right)}} - \frac{0.5 \cdot 1}{\mathsf{hypot}\left(1, x\right)}}{1 + \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}}\]
  9. Applied frac-sub15.4

    \[\leadsto \frac{\color{blue}{\frac{\left(1 \cdot \left({1}^{3} - {0.5}^{3}\right)\right) \cdot \mathsf{hypot}\left(1, x\right) - \left(1 \cdot 1 + \left(0.5 \cdot 0.5 + 1 \cdot 0.5\right)\right) \cdot \left(0.5 \cdot 1\right)}{\left(1 \cdot 1 + \left(0.5 \cdot 0.5 + 1 \cdot 0.5\right)\right) \cdot \mathsf{hypot}\left(1, x\right)}}}{1 + \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}}\]
  10. Simplified15.4

    \[\leadsto \frac{\frac{\color{blue}{1 \cdot \left(\left({1}^{3} - {0.5}^{3}\right) \cdot \mathsf{hypot}\left(1, x\right) - 0.5 \cdot \left(0.5 \cdot \left(0.5 + 1\right) + 1 \cdot 1\right)\right)}}{\left(1 \cdot 1 + \left(0.5 \cdot 0.5 + 1 \cdot 0.5\right)\right) \cdot \mathsf{hypot}\left(1, x\right)}}{1 + \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}}\]
  11. Simplified15.4

    \[\leadsto \frac{\frac{1 \cdot \left(\left({1}^{3} - {0.5}^{3}\right) \cdot \mathsf{hypot}\left(1, x\right) - 0.5 \cdot \left(0.5 \cdot \left(0.5 + 1\right) + 1 \cdot 1\right)\right)}{\color{blue}{\mathsf{hypot}\left(1, x\right) \cdot \left(0.5 \cdot \left(0.5 + 1\right) + 1 \cdot 1\right)}}}{1 + \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}}\]
  12. Using strategy rm
  13. Applied add-cube-cbrt15.4

    \[\leadsto \frac{\frac{1 \cdot \left(\left({1}^{3} - {0.5}^{3}\right) \cdot \mathsf{hypot}\left(1, x\right) - 0.5 \cdot \left(0.5 \cdot \left(0.5 + 1\right) + 1 \cdot 1\right)\right)}{\mathsf{hypot}\left(1, x\right) \cdot \left(0.5 \cdot \left(0.5 + 1\right) + 1 \cdot 1\right)}}{1 + \sqrt{0.5 \cdot \color{blue}{\left(\left(\sqrt[3]{1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}} \cdot \sqrt[3]{1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}}\right) \cdot \sqrt[3]{1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}}\right)}}}\]
  14. Using strategy rm
  15. Applied flip3-+15.4

    \[\leadsto \frac{\frac{1 \cdot \left(\left({1}^{3} - {0.5}^{3}\right) \cdot \mathsf{hypot}\left(1, x\right) - 0.5 \cdot \left(0.5 \cdot \left(0.5 + 1\right) + 1 \cdot 1\right)\right)}{\mathsf{hypot}\left(1, x\right) \cdot \left(0.5 \cdot \left(0.5 + 1\right) + 1 \cdot 1\right)}}{1 + \sqrt{0.5 \cdot \left(\left(\sqrt[3]{1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}} \cdot \sqrt[3]{\color{blue}{\frac{{1}^{3} + {\left(\frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}^{3}}{1 \cdot 1 + \left(\frac{1}{\mathsf{hypot}\left(1, x\right)} \cdot \frac{1}{\mathsf{hypot}\left(1, x\right)} - 1 \cdot \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}}}\right) \cdot \sqrt[3]{1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}}\right)}}\]
  16. Applied cbrt-div15.4

    \[\leadsto \frac{\frac{1 \cdot \left(\left({1}^{3} - {0.5}^{3}\right) \cdot \mathsf{hypot}\left(1, x\right) - 0.5 \cdot \left(0.5 \cdot \left(0.5 + 1\right) + 1 \cdot 1\right)\right)}{\mathsf{hypot}\left(1, x\right) \cdot \left(0.5 \cdot \left(0.5 + 1\right) + 1 \cdot 1\right)}}{1 + \sqrt{0.5 \cdot \left(\left(\sqrt[3]{1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}} \cdot \color{blue}{\frac{\sqrt[3]{{1}^{3} + {\left(\frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}^{3}}}{\sqrt[3]{1 \cdot 1 + \left(\frac{1}{\mathsf{hypot}\left(1, x\right)} \cdot \frac{1}{\mathsf{hypot}\left(1, x\right)} - 1 \cdot \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}}}\right) \cdot \sqrt[3]{1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}}\right)}}\]
  17. Final simplification15.4

    \[\leadsto \frac{\frac{1 \cdot \left(\left({1}^{3} - {0.5}^{3}\right) \cdot \mathsf{hypot}\left(1, x\right) - 0.5 \cdot \left(0.5 \cdot \left(0.5 + 1\right) + 1 \cdot 1\right)\right)}{\mathsf{hypot}\left(1, x\right) \cdot \left(0.5 \cdot \left(0.5 + 1\right) + 1 \cdot 1\right)}}{1 + \sqrt{0.5 \cdot \left(\left(\sqrt[3]{1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}} \cdot \frac{\sqrt[3]{{1}^{3} + {\left(\frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}^{3}}}{\sqrt[3]{1 \cdot 1 + \left(\frac{1}{\mathsf{hypot}\left(1, x\right)} \cdot \frac{1}{\mathsf{hypot}\left(1, x\right)} - 1 \cdot \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}}\right) \cdot \sqrt[3]{1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}}\right)}}\]

Reproduce

herbie shell --seed 2019356 
(FPCore (x)
  :name "Given's Rotation SVD example, simplified"
  :precision binary64
  (- 1 (sqrt (* 0.5 (+ 1 (/ 1 (hypot 1 x)))))))