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.000000000005262457136723242001608014107:\\
\;\;\;\;\frac{\mathsf{fma}\left(\frac{{x}^{2}}{{\left(\sqrt{1}\right)}^{3}}, 0.25, 0.5 - \mathsf{fma}\left(\frac{{x}^{4}}{{\left(\sqrt{1}\right)}^{5}}, 0.1875, \frac{0.5}{\sqrt{1}}\right)\right)}{1 + \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{\log \left(e^{1 \cdot 1 - \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right) \cdot 0.5}\right)}}{\frac{1 + \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}}{\sqrt{\sqrt[3]{{\left(1 \cdot 1 - \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right) \cdot 0.5\right)}^{3}}}}}\\
\end{array}double f(double x) {
double r168051 = 1.0;
double r168052 = 0.5;
double r168053 = x;
double r168054 = hypot(r168051, r168053);
double r168055 = r168051 / r168054;
double r168056 = r168051 + r168055;
double r168057 = r168052 * r168056;
double r168058 = sqrt(r168057);
double r168059 = r168051 - r168058;
return r168059;
}
double f(double x) {
double r168060 = 1.0;
double r168061 = x;
double r168062 = hypot(r168060, r168061);
double r168063 = 1.0000000000052625;
bool r168064 = r168062 <= r168063;
double r168065 = 2.0;
double r168066 = pow(r168061, r168065);
double r168067 = sqrt(r168060);
double r168068 = 3.0;
double r168069 = pow(r168067, r168068);
double r168070 = r168066 / r168069;
double r168071 = 0.25;
double r168072 = 0.5;
double r168073 = 4.0;
double r168074 = pow(r168061, r168073);
double r168075 = 5.0;
double r168076 = pow(r168067, r168075);
double r168077 = r168074 / r168076;
double r168078 = 0.1875;
double r168079 = r168072 / r168067;
double r168080 = fma(r168077, r168078, r168079);
double r168081 = r168072 - r168080;
double r168082 = fma(r168070, r168071, r168081);
double r168083 = r168060 / r168062;
double r168084 = r168060 + r168083;
double r168085 = r168072 * r168084;
double r168086 = sqrt(r168085);
double r168087 = r168060 + r168086;
double r168088 = r168082 / r168087;
double r168089 = r168060 * r168060;
double r168090 = r168084 * r168072;
double r168091 = r168089 - r168090;
double r168092 = exp(r168091);
double r168093 = log(r168092);
double r168094 = sqrt(r168093);
double r168095 = pow(r168091, r168068);
double r168096 = cbrt(r168095);
double r168097 = sqrt(r168096);
double r168098 = r168087 / r168097;
double r168099 = r168094 / r168098;
double r168100 = r168064 ? r168088 : r168099;
return r168100;
}



Bits error versus x
if (hypot 1.0 x) < 1.0000000000052625Initial program 30.0
rmApplied flip--30.0
Simplified30.0
rmApplied add-log-exp30.0
Applied add-log-exp30.0
Applied diff-log30.0
Simplified30.0
Taylor expanded around 0 30.0
Simplified0.1
if 1.0000000000052625 < (hypot 1.0 x) Initial program 1.2
rmApplied flip--1.2
Simplified0.3
rmApplied add-log-exp0.3
Applied add-log-exp0.3
Applied diff-log1.2
Simplified0.3
rmApplied add-sqr-sqrt1.2
Applied associate-/l*1.2
Simplified1.2
rmApplied add-cbrt-cube0.3
Simplified0.3
Final simplification0.2
herbie shell --seed 2019304 +o rules:numerics
(FPCore (x)
:name "Given's Rotation SVD example, simplified"
:precision binary64
(- 1 (sqrt (* 0.5 (+ 1 (/ 1 (hypot 1 x)))))))