Average Error: 15.6 → 15.1
Time: 7.3s
Precision: 64
\[1 - \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}\]
\[\frac{\frac{1 \cdot \left(1 - 0.5\right)}{1 + \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}} \cdot \frac{1 \cdot \left(1 - 0.5\right)}{1 + \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}} - \frac{0.5 \cdot \frac{1}{\mathsf{hypot}\left(1, x\right)}}{\frac{{1}^{3} + {\left(\sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}\right)}^{3}}{\left(1 \cdot 1 + 0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)\right) - 1 \cdot \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}}} \cdot \frac{0.5 \cdot \frac{1}{\mathsf{hypot}\left(1, x\right)}}{\frac{{1}^{3} + {\left(\sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}\right)}^{3}}{\left(1 \cdot 1 + 0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)\right) - 1 \cdot \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}}}}{\frac{1 \cdot \left(1 - 0.5\right)}{1 + \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}} + \frac{0.5 \cdot \frac{1}{\mathsf{hypot}\left(1, x\right)}}{\frac{{1}^{3} + {\left(\sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}\right)}^{3}}{\left(1 \cdot 1 + 0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)\right) - 1 \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)}
\frac{\frac{1 \cdot \left(1 - 0.5\right)}{1 + \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}} \cdot \frac{1 \cdot \left(1 - 0.5\right)}{1 + \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}} - \frac{0.5 \cdot \frac{1}{\mathsf{hypot}\left(1, x\right)}}{\frac{{1}^{3} + {\left(\sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}\right)}^{3}}{\left(1 \cdot 1 + 0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)\right) - 1 \cdot \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}}} \cdot \frac{0.5 \cdot \frac{1}{\mathsf{hypot}\left(1, x\right)}}{\frac{{1}^{3} + {\left(\sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}\right)}^{3}}{\left(1 \cdot 1 + 0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)\right) - 1 \cdot \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}}}}{\frac{1 \cdot \left(1 - 0.5\right)}{1 + \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}} + \frac{0.5 \cdot \frac{1}{\mathsf{hypot}\left(1, x\right)}}{\frac{{1}^{3} + {\left(\sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}\right)}^{3}}{\left(1 \cdot 1 + 0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)\right) - 1 \cdot \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}}}}
double f(double x) {
        double r172340 = 1.0;
        double r172341 = 0.5;
        double r172342 = x;
        double r172343 = hypot(r172340, r172342);
        double r172344 = r172340 / r172343;
        double r172345 = r172340 + r172344;
        double r172346 = r172341 * r172345;
        double r172347 = sqrt(r172346);
        double r172348 = r172340 - r172347;
        return r172348;
}

double f(double x) {
        double r172349 = 1.0;
        double r172350 = 0.5;
        double r172351 = r172349 - r172350;
        double r172352 = r172349 * r172351;
        double r172353 = x;
        double r172354 = hypot(r172349, r172353);
        double r172355 = r172349 / r172354;
        double r172356 = r172349 + r172355;
        double r172357 = r172350 * r172356;
        double r172358 = sqrt(r172357);
        double r172359 = r172349 + r172358;
        double r172360 = r172352 / r172359;
        double r172361 = r172360 * r172360;
        double r172362 = r172350 * r172355;
        double r172363 = 3.0;
        double r172364 = pow(r172349, r172363);
        double r172365 = pow(r172358, r172363);
        double r172366 = r172364 + r172365;
        double r172367 = r172349 * r172349;
        double r172368 = r172367 + r172357;
        double r172369 = r172349 * r172358;
        double r172370 = r172368 - r172369;
        double r172371 = r172366 / r172370;
        double r172372 = r172362 / r172371;
        double r172373 = r172372 * r172372;
        double r172374 = r172361 - r172373;
        double r172375 = r172360 + r172372;
        double r172376 = r172374 / r172375;
        return r172376;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 15.6

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

    \[\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.1

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

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

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

    \[\leadsto \frac{1 \cdot \left(1 - 0.5\right)}{1 + \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}} - \frac{0.5 \cdot \frac{1}{\mathsf{hypot}\left(1, x\right)}}{\frac{{1}^{3} + {\left(\sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}\right)}^{3}}{\color{blue}{\left(1 \cdot 1 + 0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)\right) - 1 \cdot \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}}}}\]
  10. Using strategy rm
  11. Applied flip--15.1

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

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

Reproduce

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