Average Error: 15.5 → 15.0
Time: 11.3s
Precision: 64
\[1 - \sqrt{\frac{1}{2} \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}\]
\[\frac{\frac{\frac{\frac{1}{64} - \frac{\frac{1}{8}}{\left(\left(\mathsf{hypot}\left(1, x\right) \cdot \sqrt[3]{\mathsf{hypot}\left(1, x\right)}\right) \cdot \left(\mathsf{hypot}\left(1, x\right) \cdot \sqrt[3]{\mathsf{hypot}\left(1, x\right)}\right)\right) \cdot \sqrt[3]{\mathsf{hypot}\left(1, x\right)}} \cdot \frac{\frac{1}{8}}{\left(\left(\mathsf{hypot}\left(1, x\right) \cdot \sqrt[3]{\mathsf{hypot}\left(1, x\right)}\right) \cdot \left(\mathsf{hypot}\left(1, x\right) \cdot \sqrt[3]{\mathsf{hypot}\left(1, x\right)}\right)\right) \cdot \sqrt[3]{\mathsf{hypot}\left(1, x\right)}}}{\frac{1}{8} + \frac{\frac{1}{8}}{\left(\left(\mathsf{hypot}\left(1, x\right) \cdot \sqrt[3]{\mathsf{hypot}\left(1, x\right)}\right) \cdot \left(\mathsf{hypot}\left(1, x\right) \cdot \sqrt[3]{\mathsf{hypot}\left(1, x\right)}\right)\right) \cdot \sqrt[3]{\mathsf{hypot}\left(1, x\right)}}}}{\frac{1}{4} + \frac{\frac{1}{4} + \frac{\frac{1}{4}}{\mathsf{hypot}\left(1, x\right)}}{\mathsf{hypot}\left(1, x\right)}}}{\sqrt{\frac{1}{2} + \frac{\frac{1}{2}}{\mathsf{hypot}\left(1, x\right)}} + 1}\]
1 - \sqrt{\frac{1}{2} \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}
\frac{\frac{\frac{\frac{1}{64} - \frac{\frac{1}{8}}{\left(\left(\mathsf{hypot}\left(1, x\right) \cdot \sqrt[3]{\mathsf{hypot}\left(1, x\right)}\right) \cdot \left(\mathsf{hypot}\left(1, x\right) \cdot \sqrt[3]{\mathsf{hypot}\left(1, x\right)}\right)\right) \cdot \sqrt[3]{\mathsf{hypot}\left(1, x\right)}} \cdot \frac{\frac{1}{8}}{\left(\left(\mathsf{hypot}\left(1, x\right) \cdot \sqrt[3]{\mathsf{hypot}\left(1, x\right)}\right) \cdot \left(\mathsf{hypot}\left(1, x\right) \cdot \sqrt[3]{\mathsf{hypot}\left(1, x\right)}\right)\right) \cdot \sqrt[3]{\mathsf{hypot}\left(1, x\right)}}}{\frac{1}{8} + \frac{\frac{1}{8}}{\left(\left(\mathsf{hypot}\left(1, x\right) \cdot \sqrt[3]{\mathsf{hypot}\left(1, x\right)}\right) \cdot \left(\mathsf{hypot}\left(1, x\right) \cdot \sqrt[3]{\mathsf{hypot}\left(1, x\right)}\right)\right) \cdot \sqrt[3]{\mathsf{hypot}\left(1, x\right)}}}}{\frac{1}{4} + \frac{\frac{1}{4} + \frac{\frac{1}{4}}{\mathsf{hypot}\left(1, x\right)}}{\mathsf{hypot}\left(1, x\right)}}}{\sqrt{\frac{1}{2} + \frac{\frac{1}{2}}{\mathsf{hypot}\left(1, x\right)}} + 1}
double f(double x) {
        double r2798951 = 1.0;
        double r2798952 = 0.5;
        double r2798953 = x;
        double r2798954 = hypot(r2798951, r2798953);
        double r2798955 = r2798951 / r2798954;
        double r2798956 = r2798951 + r2798955;
        double r2798957 = r2798952 * r2798956;
        double r2798958 = sqrt(r2798957);
        double r2798959 = r2798951 - r2798958;
        return r2798959;
}

double f(double x) {
        double r2798960 = 0.015625;
        double r2798961 = 0.125;
        double r2798962 = 1.0;
        double r2798963 = x;
        double r2798964 = hypot(r2798962, r2798963);
        double r2798965 = cbrt(r2798964);
        double r2798966 = r2798964 * r2798965;
        double r2798967 = r2798966 * r2798966;
        double r2798968 = r2798967 * r2798965;
        double r2798969 = r2798961 / r2798968;
        double r2798970 = r2798969 * r2798969;
        double r2798971 = r2798960 - r2798970;
        double r2798972 = r2798961 + r2798969;
        double r2798973 = r2798971 / r2798972;
        double r2798974 = 0.25;
        double r2798975 = r2798974 / r2798964;
        double r2798976 = r2798974 + r2798975;
        double r2798977 = r2798976 / r2798964;
        double r2798978 = r2798974 + r2798977;
        double r2798979 = r2798973 / r2798978;
        double r2798980 = 0.5;
        double r2798981 = r2798980 / r2798964;
        double r2798982 = r2798980 + r2798981;
        double r2798983 = sqrt(r2798982);
        double r2798984 = r2798983 + r2798962;
        double r2798985 = r2798979 / r2798984;
        return r2798985;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 15.5

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

    \[\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--15.5

    \[\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. Simplified15.0

    \[\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 flip3--15.0

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

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

    \[\leadsto \frac{\frac{\frac{1}{8} - \frac{\frac{1}{8}}{\left(\mathsf{hypot}\left(1, x\right) \cdot \mathsf{hypot}\left(1, x\right)\right) \cdot \mathsf{hypot}\left(1, x\right)}}{\color{blue}{\frac{1}{4} + \frac{\frac{1}{4} + \frac{\frac{1}{4}}{\mathsf{hypot}\left(1, x\right)}}{\mathsf{hypot}\left(1, x\right)}}}}{1 + \sqrt{\frac{\frac{1}{2}}{\mathsf{hypot}\left(1, x\right)} + \frac{1}{2}}}\]
  10. Using strategy rm
  11. Applied add-cube-cbrt15.0

    \[\leadsto \frac{\frac{\frac{1}{8} - \frac{\frac{1}{8}}{\left(\mathsf{hypot}\left(1, x\right) \cdot \mathsf{hypot}\left(1, x\right)\right) \cdot \color{blue}{\left(\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)}}}{\frac{1}{4} + \frac{\frac{1}{4} + \frac{\frac{1}{4}}{\mathsf{hypot}\left(1, x\right)}}{\mathsf{hypot}\left(1, x\right)}}}{1 + \sqrt{\frac{\frac{1}{2}}{\mathsf{hypot}\left(1, x\right)} + \frac{1}{2}}}\]
  12. Applied associate-*r*15.0

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

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

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

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

Reproduce

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