Average Error: 15.9 → 15.4
Time: 17.7s
Precision: 64
\[1 - \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}\]
\[\frac{{0.5}^{3} - {\left({\left(\frac{0.5}{\mathsf{hypot}\left(1, x\right)}\right)}^{\left(\sqrt[3]{3} \cdot \sqrt[3]{3}\right)}\right)}^{\left(\sqrt[3]{3}\right)}}{\left(1 + \sqrt{1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}} \cdot \sqrt{0.5}\right) \cdot \left(0.5 \cdot 0.5 + \frac{0.5}{\mathsf{hypot}\left(1, x\right)} \cdot \left(0.5 + \frac{0.5}{\mathsf{hypot}\left(1, x\right)}\right)\right)}\]
1 - \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}
\frac{{0.5}^{3} - {\left({\left(\frac{0.5}{\mathsf{hypot}\left(1, x\right)}\right)}^{\left(\sqrt[3]{3} \cdot \sqrt[3]{3}\right)}\right)}^{\left(\sqrt[3]{3}\right)}}{\left(1 + \sqrt{1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}} \cdot \sqrt{0.5}\right) \cdot \left(0.5 \cdot 0.5 + \frac{0.5}{\mathsf{hypot}\left(1, x\right)} \cdot \left(0.5 + \frac{0.5}{\mathsf{hypot}\left(1, x\right)}\right)\right)}
double f(double x) {
        double r140113 = 1.0;
        double r140114 = 0.5;
        double r140115 = x;
        double r140116 = hypot(r140113, r140115);
        double r140117 = r140113 / r140116;
        double r140118 = r140113 + r140117;
        double r140119 = r140114 * r140118;
        double r140120 = sqrt(r140119);
        double r140121 = r140113 - r140120;
        return r140121;
}

double f(double x) {
        double r140122 = 0.5;
        double r140123 = 3.0;
        double r140124 = pow(r140122, r140123);
        double r140125 = 1.0;
        double r140126 = x;
        double r140127 = hypot(r140125, r140126);
        double r140128 = r140122 / r140127;
        double r140129 = cbrt(r140123);
        double r140130 = r140129 * r140129;
        double r140131 = pow(r140128, r140130);
        double r140132 = pow(r140131, r140129);
        double r140133 = r140124 - r140132;
        double r140134 = r140125 / r140127;
        double r140135 = r140125 + r140134;
        double r140136 = sqrt(r140135);
        double r140137 = sqrt(r140122);
        double r140138 = r140136 * r140137;
        double r140139 = r140125 + r140138;
        double r140140 = r140122 * r140122;
        double r140141 = r140122 + r140128;
        double r140142 = r140128 * r140141;
        double r140143 = r140140 + r140142;
        double r140144 = r140139 * r140143;
        double r140145 = r140133 / r140144;
        return r140145;
}

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 1 - 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)}}\]
  5. Taylor expanded around 0 15.4

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

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

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

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

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

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

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

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

Reproduce

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