1 - \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}\begin{array}{l}
\mathbf{if}\;\mathsf{hypot}\left(1, x\right) \le 1.000000109998239405939557400415651500225:\\
\;\;\;\;\frac{\mathsf{fma}\left(\frac{{x}^{2}}{{\left(\sqrt{1}\right)}^{5}}, 0.1875, \mathsf{fma}\left(\frac{{x}^{2}}{1 \cdot 1}, 0.375, \mathsf{fma}\left(0.1875, \frac{{x}^{2}}{{\left(\sqrt{1}\right)}^{3}}, 0.875\right)\right) - \mathsf{fma}\left(0.375, \frac{1}{\sqrt{1}}, \mathsf{fma}\left(\frac{1}{1}, 0.375, \mathsf{fma}\left(0.140625, \frac{{x}^{4}}{{\left(\sqrt{1}\right)}^{5}}, \mathsf{fma}\left(0.234375, \frac{{x}^{4}}{{\left(\sqrt{1}\right)}^{7}}, \mathsf{fma}\left(0.375, \frac{{x}^{4}}{{\left(\sqrt{1}\right)}^{6}}, 0.125 \cdot \frac{1}{{\left(\sqrt{1}\right)}^{3}}\right)\right)\right)\right)\right)\right)}{\left(1 + \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}\right) \cdot \mathsf{fma}\left(\left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right) \cdot 0.5, \mathsf{fma}\left(1, 1, 0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)\right), {1}^{4}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt[3]{{\left({\left(1 \cdot 1\right)}^{3} - \sqrt[3]{{\left({\left(0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)\right)}^{3}\right)}^{3}}\right)}^{3}}}{\left(1 + \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}\right) \cdot \mathsf{fma}\left(\left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right) \cdot 0.5, \mathsf{fma}\left(1, 1, 0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)\right), {1}^{4}\right)}\\
\end{array}double f(double x) {
double r386470 = 1.0;
double r386471 = 0.5;
double r386472 = x;
double r386473 = hypot(r386470, r386472);
double r386474 = r386470 / r386473;
double r386475 = r386470 + r386474;
double r386476 = r386471 * r386475;
double r386477 = sqrt(r386476);
double r386478 = r386470 - r386477;
return r386478;
}
double f(double x) {
double r386479 = 1.0;
double r386480 = x;
double r386481 = hypot(r386479, r386480);
double r386482 = 1.0000001099982394;
bool r386483 = r386481 <= r386482;
double r386484 = 2.0;
double r386485 = pow(r386480, r386484);
double r386486 = sqrt(r386479);
double r386487 = 5.0;
double r386488 = pow(r386486, r386487);
double r386489 = r386485 / r386488;
double r386490 = 0.1875;
double r386491 = r386479 * r386479;
double r386492 = r386485 / r386491;
double r386493 = 0.375;
double r386494 = 3.0;
double r386495 = pow(r386486, r386494);
double r386496 = r386485 / r386495;
double r386497 = 0.875;
double r386498 = fma(r386490, r386496, r386497);
double r386499 = fma(r386492, r386493, r386498);
double r386500 = 1.0;
double r386501 = r386500 / r386486;
double r386502 = r386500 / r386479;
double r386503 = 0.140625;
double r386504 = 4.0;
double r386505 = pow(r386480, r386504);
double r386506 = r386505 / r386488;
double r386507 = 0.234375;
double r386508 = 7.0;
double r386509 = pow(r386486, r386508);
double r386510 = r386505 / r386509;
double r386511 = 6.0;
double r386512 = pow(r386486, r386511);
double r386513 = r386505 / r386512;
double r386514 = 0.125;
double r386515 = r386500 / r386495;
double r386516 = r386514 * r386515;
double r386517 = fma(r386493, r386513, r386516);
double r386518 = fma(r386507, r386510, r386517);
double r386519 = fma(r386503, r386506, r386518);
double r386520 = fma(r386502, r386493, r386519);
double r386521 = fma(r386493, r386501, r386520);
double r386522 = r386499 - r386521;
double r386523 = fma(r386489, r386490, r386522);
double r386524 = 0.5;
double r386525 = r386479 / r386481;
double r386526 = r386479 + r386525;
double r386527 = r386524 * r386526;
double r386528 = sqrt(r386527);
double r386529 = r386479 + r386528;
double r386530 = r386526 * r386524;
double r386531 = fma(r386479, r386479, r386527);
double r386532 = pow(r386479, r386504);
double r386533 = fma(r386530, r386531, r386532);
double r386534 = r386529 * r386533;
double r386535 = r386523 / r386534;
double r386536 = pow(r386491, r386494);
double r386537 = pow(r386527, r386494);
double r386538 = pow(r386537, r386494);
double r386539 = cbrt(r386538);
double r386540 = r386536 - r386539;
double r386541 = pow(r386540, r386494);
double r386542 = cbrt(r386541);
double r386543 = r386542 / r386534;
double r386544 = r386483 ? r386535 : r386543;
return r386544;
}



Bits error versus x
if (hypot 1.0 x) < 1.0000001099982394Initial program 29.6
rmApplied flip--29.6
Simplified29.6
rmApplied flip3--29.6
Applied associate-/l/29.6
Simplified29.6
rmApplied add-cbrt-cube29.6
Simplified29.6
Taylor expanded around 0 29.6
Simplified26.0
if 1.0000001099982394 < (hypot 1.0 x) Initial program 1.1
rmApplied flip--1.1
Simplified0.1
rmApplied flip3--0.1
Applied associate-/l/0.1
Simplified0.1
rmApplied add-cbrt-cube0.1
Simplified0.1
rmApplied add-cbrt-cube0.1
Simplified0.1
Final simplification13.0
herbie shell --seed 2019326 +o rules:numerics
(FPCore (x)
:name "Given's Rotation SVD example, simplified"
:precision binary64
(- 1 (sqrt (* 0.5 (+ 1 (/ 1 (hypot 1 x)))))))