Average Error: 15.3 → 14.8
Time: 8.3s
Precision: 64
\[1 - \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}\]
\[\frac{\log \left(e^{\left(1 - 0.5\right) - \frac{0.5}{\mathsf{hypot}\left(1, x\right)}}\right) \cdot 1}{1 + \sqrt{0.5 \cdot \left(1 + \frac{\sqrt{1}}{\sqrt{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}} \cdot {\left(\sqrt{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}}\right)}^{3}} \cdot \frac{\sqrt{1}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}}\right)}}\]
1 - \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}
\frac{\log \left(e^{\left(1 - 0.5\right) - \frac{0.5}{\mathsf{hypot}\left(1, x\right)}}\right) \cdot 1}{1 + \sqrt{0.5 \cdot \left(1 + \frac{\sqrt{1}}{\sqrt{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}} \cdot {\left(\sqrt{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}}\right)}^{3}} \cdot \frac{\sqrt{1}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}}\right)}}
double f(double x) {
        double r226829 = 1.0;
        double r226830 = 0.5;
        double r226831 = x;
        double r226832 = hypot(r226829, r226831);
        double r226833 = r226829 / r226832;
        double r226834 = r226829 + r226833;
        double r226835 = r226830 * r226834;
        double r226836 = sqrt(r226835);
        double r226837 = r226829 - r226836;
        return r226837;
}

double f(double x) {
        double r226838 = 1.0;
        double r226839 = 0.5;
        double r226840 = r226838 - r226839;
        double r226841 = x;
        double r226842 = hypot(r226838, r226841);
        double r226843 = r226839 / r226842;
        double r226844 = r226840 - r226843;
        double r226845 = exp(r226844);
        double r226846 = log(r226845);
        double r226847 = r226846 * r226838;
        double r226848 = sqrt(r226838);
        double r226849 = cbrt(r226842);
        double r226850 = sqrt(r226849);
        double r226851 = 3.0;
        double r226852 = pow(r226850, r226851);
        double r226853 = r226850 * r226852;
        double r226854 = r226848 / r226853;
        double r226855 = r226848 / r226849;
        double r226856 = r226854 * r226855;
        double r226857 = r226838 + r226856;
        double r226858 = r226839 * r226857;
        double r226859 = sqrt(r226858);
        double r226860 = r226838 + r226859;
        double r226861 = r226847 / r226860;
        return r226861;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 15.3

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

    \[\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. Simplified14.8

    \[\leadsto \frac{\color{blue}{\left(\left(1 - 0.5\right) - \frac{0.5}{\mathsf{hypot}\left(1, x\right)}\right) \cdot 1}}{1 + \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}}\]
  5. Using strategy rm
  6. Applied add-log-exp14.8

    \[\leadsto \frac{\left(\left(1 - 0.5\right) - \color{blue}{\log \left(e^{\frac{0.5}{\mathsf{hypot}\left(1, x\right)}}\right)}\right) \cdot 1}{1 + \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}}\]
  7. Applied add-log-exp14.8

    \[\leadsto \frac{\left(\left(1 - \color{blue}{\log \left(e^{0.5}\right)}\right) - \log \left(e^{\frac{0.5}{\mathsf{hypot}\left(1, x\right)}}\right)\right) \cdot 1}{1 + \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}}\]
  8. Applied add-log-exp14.8

    \[\leadsto \frac{\left(\left(\color{blue}{\log \left(e^{1}\right)} - \log \left(e^{0.5}\right)\right) - \log \left(e^{\frac{0.5}{\mathsf{hypot}\left(1, x\right)}}\right)\right) \cdot 1}{1 + \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}}\]
  9. Applied diff-log31.0

    \[\leadsto \frac{\left(\color{blue}{\log \left(\frac{e^{1}}{e^{0.5}}\right)} - \log \left(e^{\frac{0.5}{\mathsf{hypot}\left(1, x\right)}}\right)\right) \cdot 1}{1 + \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}}\]
  10. Applied diff-log31.0

    \[\leadsto \frac{\color{blue}{\log \left(\frac{\frac{e^{1}}{e^{0.5}}}{e^{\frac{0.5}{\mathsf{hypot}\left(1, x\right)}}}\right)} \cdot 1}{1 + \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}}\]
  11. Simplified14.8

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

    \[\leadsto \frac{\log \left(e^{\left(1 - 0.5\right) - \frac{0.5}{\mathsf{hypot}\left(1, x\right)}}\right) \cdot 1}{1 + \sqrt{0.5 \cdot \left(1 + \frac{1}{\color{blue}{\left(\sqrt[3]{\mathsf{hypot}\left(1, x\right)} \cdot \sqrt[3]{\mathsf{hypot}\left(1, x\right)}\right) \cdot \sqrt[3]{\mathsf{hypot}\left(1, x\right)}}}\right)}}\]
  14. Applied add-sqr-sqrt14.8

    \[\leadsto \frac{\log \left(e^{\left(1 - 0.5\right) - \frac{0.5}{\mathsf{hypot}\left(1, x\right)}}\right) \cdot 1}{1 + \sqrt{0.5 \cdot \left(1 + \frac{\color{blue}{\sqrt{1} \cdot \sqrt{1}}}{\left(\sqrt[3]{\mathsf{hypot}\left(1, x\right)} \cdot \sqrt[3]{\mathsf{hypot}\left(1, x\right)}\right) \cdot \sqrt[3]{\mathsf{hypot}\left(1, x\right)}}\right)}}\]
  15. Applied times-frac14.8

    \[\leadsto \frac{\log \left(e^{\left(1 - 0.5\right) - \frac{0.5}{\mathsf{hypot}\left(1, x\right)}}\right) \cdot 1}{1 + \sqrt{0.5 \cdot \left(1 + \color{blue}{\frac{\sqrt{1}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)} \cdot \sqrt[3]{\mathsf{hypot}\left(1, x\right)}} \cdot \frac{\sqrt{1}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}}}\right)}}\]
  16. Using strategy rm
  17. Applied add-sqr-sqrt14.8

    \[\leadsto \frac{\log \left(e^{\left(1 - 0.5\right) - \frac{0.5}{\mathsf{hypot}\left(1, x\right)}}\right) \cdot 1}{1 + \sqrt{0.5 \cdot \left(1 + \frac{\sqrt{1}}{\color{blue}{\left(\sqrt{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}} \cdot \sqrt{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}}\right)} \cdot \sqrt[3]{\mathsf{hypot}\left(1, x\right)}} \cdot \frac{\sqrt{1}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}}\right)}}\]
  18. Applied associate-*l*14.8

    \[\leadsto \frac{\log \left(e^{\left(1 - 0.5\right) - \frac{0.5}{\mathsf{hypot}\left(1, x\right)}}\right) \cdot 1}{1 + \sqrt{0.5 \cdot \left(1 + \frac{\sqrt{1}}{\color{blue}{\sqrt{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}} \cdot \left(\sqrt{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}} \cdot \sqrt[3]{\mathsf{hypot}\left(1, x\right)}\right)}} \cdot \frac{\sqrt{1}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}}\right)}}\]
  19. Simplified14.8

    \[\leadsto \frac{\log \left(e^{\left(1 - 0.5\right) - \frac{0.5}{\mathsf{hypot}\left(1, x\right)}}\right) \cdot 1}{1 + \sqrt{0.5 \cdot \left(1 + \frac{\sqrt{1}}{\sqrt{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}} \cdot \color{blue}{{\left(\sqrt{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}}\right)}^{3}}} \cdot \frac{\sqrt{1}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}}\right)}}\]
  20. Final simplification14.8

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

Reproduce

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