Average Error: 15.1 → 14.6
Time: 32.9s
Precision: 64
\[1 - \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}\]
\[\frac{\sqrt[3]{\left(\left(\left(1 \cdot 1\right) \cdot 1 - \sqrt{0.5 \cdot \left(\frac{1}{\mathsf{hypot}\left(1, x\right)} + 1\right)} \cdot \left(0.5 \cdot \left(\frac{1}{\mathsf{hypot}\left(1, x\right)} + 1\right)\right)\right) \cdot \left(\left(1 \cdot 1\right) \cdot 1 - \sqrt{0.5 \cdot \left(\frac{1}{\mathsf{hypot}\left(1, x\right)} + 1\right)} \cdot \left(0.5 \cdot \left(\frac{1}{\mathsf{hypot}\left(1, x\right)} + 1\right)\right)\right)\right) \cdot \log \left(e^{\left(1 \cdot 1\right) \cdot 1 - \sqrt{0.5 \cdot \left(\frac{1}{\mathsf{hypot}\left(1, x\right)} + 1\right)} \cdot \left(0.5 \cdot \left(\frac{1}{\mathsf{hypot}\left(1, x\right)} + 1\right)\right)}\right)}}{0.5 \cdot \left(\frac{1}{\mathsf{hypot}\left(1, x\right)} + 1\right) + 1 \cdot \left(\sqrt{0.5 \cdot \left(\frac{1}{\mathsf{hypot}\left(1, x\right)} + 1\right)} + 1\right)}\]
1 - \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}
\frac{\sqrt[3]{\left(\left(\left(1 \cdot 1\right) \cdot 1 - \sqrt{0.5 \cdot \left(\frac{1}{\mathsf{hypot}\left(1, x\right)} + 1\right)} \cdot \left(0.5 \cdot \left(\frac{1}{\mathsf{hypot}\left(1, x\right)} + 1\right)\right)\right) \cdot \left(\left(1 \cdot 1\right) \cdot 1 - \sqrt{0.5 \cdot \left(\frac{1}{\mathsf{hypot}\left(1, x\right)} + 1\right)} \cdot \left(0.5 \cdot \left(\frac{1}{\mathsf{hypot}\left(1, x\right)} + 1\right)\right)\right)\right) \cdot \log \left(e^{\left(1 \cdot 1\right) \cdot 1 - \sqrt{0.5 \cdot \left(\frac{1}{\mathsf{hypot}\left(1, x\right)} + 1\right)} \cdot \left(0.5 \cdot \left(\frac{1}{\mathsf{hypot}\left(1, x\right)} + 1\right)\right)}\right)}}{0.5 \cdot \left(\frac{1}{\mathsf{hypot}\left(1, x\right)} + 1\right) + 1 \cdot \left(\sqrt{0.5 \cdot \left(\frac{1}{\mathsf{hypot}\left(1, x\right)} + 1\right)} + 1\right)}
double f(double x) {
        double r9230697 = 1.0;
        double r9230698 = 0.5;
        double r9230699 = x;
        double r9230700 = hypot(r9230697, r9230699);
        double r9230701 = r9230697 / r9230700;
        double r9230702 = r9230697 + r9230701;
        double r9230703 = r9230698 * r9230702;
        double r9230704 = sqrt(r9230703);
        double r9230705 = r9230697 - r9230704;
        return r9230705;
}

double f(double x) {
        double r9230706 = 1.0;
        double r9230707 = r9230706 * r9230706;
        double r9230708 = r9230707 * r9230706;
        double r9230709 = 0.5;
        double r9230710 = x;
        double r9230711 = hypot(r9230706, r9230710);
        double r9230712 = r9230706 / r9230711;
        double r9230713 = r9230712 + r9230706;
        double r9230714 = r9230709 * r9230713;
        double r9230715 = sqrt(r9230714);
        double r9230716 = r9230715 * r9230714;
        double r9230717 = r9230708 - r9230716;
        double r9230718 = r9230717 * r9230717;
        double r9230719 = exp(r9230717);
        double r9230720 = log(r9230719);
        double r9230721 = r9230718 * r9230720;
        double r9230722 = cbrt(r9230721);
        double r9230723 = r9230715 + r9230706;
        double r9230724 = r9230706 * r9230723;
        double r9230725 = r9230714 + r9230724;
        double r9230726 = r9230722 / r9230725;
        return r9230726;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 15.1

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

    \[\leadsto \color{blue}{\frac{{1}^{3} - {\left(\sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}\right)}^{3}}{1 \cdot 1 + \left(\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 \cdot \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}\right)}}\]
  4. Simplified15.1

    \[\leadsto \frac{\color{blue}{\left(1 \cdot 1\right) \cdot 1 - \left(\left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right) \cdot 0.5\right) \cdot \sqrt{\left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right) \cdot 0.5}}}{1 \cdot 1 + \left(\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 \cdot \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}\right)}\]
  5. Simplified14.6

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

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

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

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

Reproduce

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