Average Error: 15.5 → 15.0
Time: 12.2s
Precision: 64
\[1 - \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}\]
\[\frac{\frac{\frac{{\left({\left(1 \cdot \left(1 - 0.5\right)\right)}^{3}\right)}^{3} - {\left({\left(\frac{1}{\mathsf{hypot}\left(1, x\right)} \cdot 0.5\right)}^{3}\right)}^{3}}{{\left(1 \cdot \left(1 - 0.5\right)\right)}^{6} + {\left(\frac{1}{\mathsf{hypot}\left(1, x\right)} \cdot 0.5\right)}^{3} \cdot \left({\left(1 \cdot \left(1 - 0.5\right)\right)}^{3} + {\left(\frac{1}{\mathsf{hypot}\left(1, x\right)} \cdot 0.5\right)}^{3}\right)}}{\left(\frac{1}{\mathsf{hypot}\left(1, x\right)} \cdot 0.5\right) \cdot \left(1 \cdot \left(1 - 0.5\right) + \frac{1}{\mathsf{hypot}\left(1, x\right)} \cdot 0.5\right) + \left(1 \cdot \left(1 - 0.5\right)\right) \cdot \left(1 \cdot \left(1 - 0.5\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{{\left({\left(1 \cdot \left(1 - 0.5\right)\right)}^{3}\right)}^{3} - {\left({\left(\frac{1}{\mathsf{hypot}\left(1, x\right)} \cdot 0.5\right)}^{3}\right)}^{3}}{{\left(1 \cdot \left(1 - 0.5\right)\right)}^{6} + {\left(\frac{1}{\mathsf{hypot}\left(1, x\right)} \cdot 0.5\right)}^{3} \cdot \left({\left(1 \cdot \left(1 - 0.5\right)\right)}^{3} + {\left(\frac{1}{\mathsf{hypot}\left(1, x\right)} \cdot 0.5\right)}^{3}\right)}}{\left(\frac{1}{\mathsf{hypot}\left(1, x\right)} \cdot 0.5\right) \cdot \left(1 \cdot \left(1 - 0.5\right) + \frac{1}{\mathsf{hypot}\left(1, x\right)} \cdot 0.5\right) + \left(1 \cdot \left(1 - 0.5\right)\right) \cdot \left(1 \cdot \left(1 - 0.5\right)\right)}}{1 + \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}}
double f(double x) {
        double r136251 = 1.0;
        double r136252 = 0.5;
        double r136253 = x;
        double r136254 = hypot(r136251, r136253);
        double r136255 = r136251 / r136254;
        double r136256 = r136251 + r136255;
        double r136257 = r136252 * r136256;
        double r136258 = sqrt(r136257);
        double r136259 = r136251 - r136258;
        return r136259;
}

double f(double x) {
        double r136260 = 1.0;
        double r136261 = 0.5;
        double r136262 = r136260 - r136261;
        double r136263 = r136260 * r136262;
        double r136264 = 3.0;
        double r136265 = pow(r136263, r136264);
        double r136266 = pow(r136265, r136264);
        double r136267 = x;
        double r136268 = hypot(r136260, r136267);
        double r136269 = r136260 / r136268;
        double r136270 = r136269 * r136261;
        double r136271 = pow(r136270, r136264);
        double r136272 = pow(r136271, r136264);
        double r136273 = r136266 - r136272;
        double r136274 = 6.0;
        double r136275 = pow(r136263, r136274);
        double r136276 = r136265 + r136271;
        double r136277 = r136271 * r136276;
        double r136278 = r136275 + r136277;
        double r136279 = r136273 / r136278;
        double r136280 = r136263 + r136270;
        double r136281 = r136270 * r136280;
        double r136282 = r136263 * r136263;
        double r136283 = r136281 + r136282;
        double r136284 = r136279 / r136283;
        double r136285 = r136260 + r136269;
        double r136286 = r136261 * r136285;
        double r136287 = sqrt(r136286);
        double r136288 = r136260 + r136287;
        double r136289 = r136284 / r136288;
        return r136289;
}

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{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}\]
  2. Using strategy rm
  3. Applied flip--15.5

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

    \[\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 distribute-rgt-in15.0

    \[\leadsto \frac{1 \cdot 1 - \color{blue}{\left(1 \cdot 0.5 + \frac{1}{\mathsf{hypot}\left(1, x\right)} \cdot 0.5\right)}}{1 + \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}}\]
  7. Applied associate--r+15.0

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

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

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

    \[\leadsto \frac{\frac{{\left(1 \cdot \left(1 - 0.5\right)\right)}^{3} - {\left(\frac{1}{\mathsf{hypot}\left(1, x\right)} \cdot 0.5\right)}^{3}}{\color{blue}{\left(\frac{1}{\mathsf{hypot}\left(1, x\right)} \cdot 0.5\right) \cdot \left(1 \cdot \left(1 - 0.5\right) + \frac{1}{\mathsf{hypot}\left(1, x\right)} \cdot 0.5\right) + \left(1 \cdot \left(1 - 0.5\right)\right) \cdot \left(1 \cdot \left(1 - 0.5\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--15.0

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

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

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

Reproduce

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