Average Error: 15.3 → 14.8
Time: 16.8s
Precision: 64
\[1 - \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}\]
\[\frac{\frac{\frac{\frac{{\left({\left({1}^{6}\right)}^{3}\right)}^{3} - {\left({\left({\left(0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)\right)}^{3}\right)}^{3}\right)}^{3}}{{\left({\left(0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)\right)}^{3}\right)}^{3} \cdot \left({\left({1}^{6}\right)}^{3} + {\left({\left(0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)\right)}^{3}\right)}^{3}\right) + {\left({1}^{6}\right)}^{6}}}{{1}^{12} + \left({1}^{6} \cdot {\left(0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)\right)}^{3} + {\left(\left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right) \cdot 0.5\right)}^{6}\right)}}{{1}^{4} + \left(0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)\right) \cdot \left(1 \cdot 1 + 0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)\right)}}{1 + \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{\frac{\frac{{\left({\left({1}^{6}\right)}^{3}\right)}^{3} - {\left({\left({\left(0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)\right)}^{3}\right)}^{3}\right)}^{3}}{{\left({\left(0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)\right)}^{3}\right)}^{3} \cdot \left({\left({1}^{6}\right)}^{3} + {\left({\left(0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)\right)}^{3}\right)}^{3}\right) + {\left({1}^{6}\right)}^{6}}}{{1}^{12} + \left({1}^{6} \cdot {\left(0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)\right)}^{3} + {\left(\left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right) \cdot 0.5\right)}^{6}\right)}}{{1}^{4} + \left(0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)\right) \cdot \left(1 \cdot 1 + 0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)\right)}}{1 + \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}}
double f(double x) {
        double r33276 = 1.0;
        double r33277 = 0.5;
        double r33278 = x;
        double r33279 = hypot(r33276, r33278);
        double r33280 = r33276 / r33279;
        double r33281 = r33276 + r33280;
        double r33282 = r33277 * r33281;
        double r33283 = sqrt(r33282);
        double r33284 = r33276 - r33283;
        return r33284;
}

double f(double x) {
        double r33285 = 1.0;
        double r33286 = 6.0;
        double r33287 = pow(r33285, r33286);
        double r33288 = 3.0;
        double r33289 = pow(r33287, r33288);
        double r33290 = pow(r33289, r33288);
        double r33291 = 0.5;
        double r33292 = x;
        double r33293 = hypot(r33285, r33292);
        double r33294 = r33285 / r33293;
        double r33295 = r33285 + r33294;
        double r33296 = r33291 * r33295;
        double r33297 = pow(r33296, r33288);
        double r33298 = pow(r33297, r33288);
        double r33299 = pow(r33298, r33288);
        double r33300 = r33290 - r33299;
        double r33301 = r33289 + r33298;
        double r33302 = r33298 * r33301;
        double r33303 = pow(r33287, r33286);
        double r33304 = r33302 + r33303;
        double r33305 = r33300 / r33304;
        double r33306 = 12.0;
        double r33307 = pow(r33285, r33306);
        double r33308 = r33287 * r33297;
        double r33309 = r33295 * r33291;
        double r33310 = pow(r33309, r33286);
        double r33311 = r33308 + r33310;
        double r33312 = r33307 + r33311;
        double r33313 = r33305 / r33312;
        double r33314 = 4.0;
        double r33315 = pow(r33285, r33314);
        double r33316 = r33285 * r33285;
        double r33317 = r33316 + r33296;
        double r33318 = r33296 * r33317;
        double r33319 = r33315 + r33318;
        double r33320 = r33313 / r33319;
        double r33321 = sqrt(r33296);
        double r33322 = r33285 + r33321;
        double r33323 = r33320 / r33322;
        return r33323;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 15.3

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

    \[\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. Simplified14.8

    \[\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. Using strategy rm
  6. Applied flip3--14.8

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

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

    \[\leadsto \frac{\frac{{1}^{6} - {\left(0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)\right)}^{3}}{\color{blue}{{1}^{4} + \left(0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)\right) \cdot \left(1 \cdot 1 + 0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)\right)}}}{1 + \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}}\]
  9. Using strategy rm
  10. Applied flip3--14.8

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

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

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

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

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

Reproduce

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