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 r384155 = 1.0;
double r384156 = 0.5;
double r384157 = x;
double r384158 = hypot(r384155, r384157);
double r384159 = r384155 / r384158;
double r384160 = r384155 + r384159;
double r384161 = r384156 * r384160;
double r384162 = sqrt(r384161);
double r384163 = r384155 - r384162;
return r384163;
}
double f(double x) {
double r384164 = 1.0;
double r384165 = x;
double r384166 = hypot(r384164, r384165);
double r384167 = 1.0000001099982394;
bool r384168 = r384166 <= r384167;
double r384169 = 2.0;
double r384170 = pow(r384165, r384169);
double r384171 = sqrt(r384164);
double r384172 = 5.0;
double r384173 = pow(r384171, r384172);
double r384174 = r384170 / r384173;
double r384175 = 0.1875;
double r384176 = r384164 * r384164;
double r384177 = r384170 / r384176;
double r384178 = 0.375;
double r384179 = 3.0;
double r384180 = pow(r384171, r384179);
double r384181 = r384170 / r384180;
double r384182 = 0.875;
double r384183 = fma(r384175, r384181, r384182);
double r384184 = fma(r384177, r384178, r384183);
double r384185 = 1.0;
double r384186 = r384185 / r384171;
double r384187 = r384185 / r384164;
double r384188 = 0.140625;
double r384189 = 4.0;
double r384190 = pow(r384165, r384189);
double r384191 = r384190 / r384173;
double r384192 = 0.234375;
double r384193 = 7.0;
double r384194 = pow(r384171, r384193);
double r384195 = r384190 / r384194;
double r384196 = 6.0;
double r384197 = pow(r384171, r384196);
double r384198 = r384190 / r384197;
double r384199 = 0.125;
double r384200 = r384185 / r384180;
double r384201 = r384199 * r384200;
double r384202 = fma(r384178, r384198, r384201);
double r384203 = fma(r384192, r384195, r384202);
double r384204 = fma(r384188, r384191, r384203);
double r384205 = fma(r384187, r384178, r384204);
double r384206 = fma(r384178, r384186, r384205);
double r384207 = r384184 - r384206;
double r384208 = fma(r384174, r384175, r384207);
double r384209 = 0.5;
double r384210 = r384164 / r384166;
double r384211 = r384164 + r384210;
double r384212 = r384209 * r384211;
double r384213 = sqrt(r384212);
double r384214 = r384164 + r384213;
double r384215 = r384211 * r384209;
double r384216 = fma(r384164, r384164, r384212);
double r384217 = pow(r384164, r384189);
double r384218 = fma(r384215, r384216, r384217);
double r384219 = r384214 * r384218;
double r384220 = r384208 / r384219;
double r384221 = pow(r384176, r384179);
double r384222 = pow(r384212, r384179);
double r384223 = pow(r384222, r384179);
double r384224 = cbrt(r384223);
double r384225 = r384221 - r384224;
double r384226 = pow(r384225, r384179);
double r384227 = cbrt(r384226);
double r384228 = r384227 / r384219;
double r384229 = r384168 ? r384220 : r384228;
return r384229;
}



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)))))))