Average Error: 14.7 → 14.2
Time: 17.1s
Precision: 64
\[1 - \sqrt{\frac{1}{2} \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}\]
\[\frac{\frac{1}{2} - \frac{\frac{1}{2}}{\mathsf{hypot}\left(1, x\right)}}{\sqrt[3]{\sqrt{\frac{1}{2} + \frac{\frac{1}{2}}{\mathsf{hypot}\left(1, x\right)}} + 1} \cdot \left(\sqrt[3]{\sqrt{\frac{1}{2} + \frac{\frac{1}{2}}{\mathsf{hypot}\left(1, x\right)}} + 1} \cdot \sqrt[3]{\sqrt{\frac{1}{2} + \frac{\frac{1}{2}}{\mathsf{hypot}\left(1, x\right)}} + 1}\right)}\]
1 - \sqrt{\frac{1}{2} \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}
\frac{\frac{1}{2} - \frac{\frac{1}{2}}{\mathsf{hypot}\left(1, x\right)}}{\sqrt[3]{\sqrt{\frac{1}{2} + \frac{\frac{1}{2}}{\mathsf{hypot}\left(1, x\right)}} + 1} \cdot \left(\sqrt[3]{\sqrt{\frac{1}{2} + \frac{\frac{1}{2}}{\mathsf{hypot}\left(1, x\right)}} + 1} \cdot \sqrt[3]{\sqrt{\frac{1}{2} + \frac{\frac{1}{2}}{\mathsf{hypot}\left(1, x\right)}} + 1}\right)}
double f(double x) {
        double r4951860 = 1.0;
        double r4951861 = 0.5;
        double r4951862 = x;
        double r4951863 = hypot(r4951860, r4951862);
        double r4951864 = r4951860 / r4951863;
        double r4951865 = r4951860 + r4951864;
        double r4951866 = r4951861 * r4951865;
        double r4951867 = sqrt(r4951866);
        double r4951868 = r4951860 - r4951867;
        return r4951868;
}

double f(double x) {
        double r4951869 = 0.5;
        double r4951870 = 1.0;
        double r4951871 = x;
        double r4951872 = hypot(r4951870, r4951871);
        double r4951873 = r4951869 / r4951872;
        double r4951874 = r4951869 - r4951873;
        double r4951875 = r4951869 + r4951873;
        double r4951876 = sqrt(r4951875);
        double r4951877 = r4951876 + r4951870;
        double r4951878 = cbrt(r4951877);
        double r4951879 = r4951878 * r4951878;
        double r4951880 = r4951878 * r4951879;
        double r4951881 = r4951874 / r4951880;
        return r4951881;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 14.7

    \[1 - \sqrt{\frac{1}{2} \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}\]
  2. Simplified14.7

    \[\leadsto \color{blue}{1 - \sqrt{\frac{\frac{1}{2}}{\mathsf{hypot}\left(1, x\right)} + \frac{1}{2}}}\]
  3. Using strategy rm
  4. Applied flip--14.7

    \[\leadsto \color{blue}{\frac{1 \cdot 1 - \sqrt{\frac{\frac{1}{2}}{\mathsf{hypot}\left(1, x\right)} + \frac{1}{2}} \cdot \sqrt{\frac{\frac{1}{2}}{\mathsf{hypot}\left(1, x\right)} + \frac{1}{2}}}{1 + \sqrt{\frac{\frac{1}{2}}{\mathsf{hypot}\left(1, x\right)} + \frac{1}{2}}}}\]
  5. Simplified14.2

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

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

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

Reproduce

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