1 - \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}\frac{\mathsf{fma}\left(\sqrt{\frac{0.5 \cdot 1}{\mathsf{hypot}\left(1, x\right)} + 0.5 \cdot 1}, 1, \mathsf{fma}\left(1, 1, \frac{0.5 \cdot 1}{\mathsf{hypot}\left(1, x\right)} + 0.5 \cdot 1\right)\right) \cdot \left(1 \cdot \left(1 \cdot 1\right)\right) - \mathsf{fma}\left(\sqrt{\frac{0.5 \cdot 1}{\mathsf{hypot}\left(1, x\right)} + 0.5 \cdot 1}, 1, \mathsf{fma}\left(1, 1, \frac{0.5 \cdot 1}{\mathsf{hypot}\left(1, x\right)} + 0.5 \cdot 1\right)\right) \cdot \left(\sqrt{\frac{0.5 \cdot 1}{\mathsf{hypot}\left(1, x\right)} + 0.5 \cdot 1} \cdot \left(\frac{0.5 \cdot 1}{\mathsf{hypot}\left(1, x\right)} + 0.5 \cdot 1\right)\right)}{\mathsf{fma}\left(\sqrt{\frac{0.5 \cdot 1}{\mathsf{hypot}\left(1, x\right)} + 0.5 \cdot 1}, 1, \mathsf{fma}\left(1, 1, \frac{0.5 \cdot 1}{\mathsf{hypot}\left(1, x\right)} + 0.5 \cdot 1\right)\right) \cdot \mathsf{fma}\left(\sqrt{\frac{0.5 \cdot 1}{\mathsf{hypot}\left(1, x\right)} + 0.5 \cdot 1}, 1, \mathsf{fma}\left(1, 1, \frac{0.5 \cdot 1}{\mathsf{hypot}\left(1, x\right)} + 0.5 \cdot 1\right)\right)}double f(double x) {
double r11188860 = 1.0;
double r11188861 = 0.5;
double r11188862 = x;
double r11188863 = hypot(r11188860, r11188862);
double r11188864 = r11188860 / r11188863;
double r11188865 = r11188860 + r11188864;
double r11188866 = r11188861 * r11188865;
double r11188867 = sqrt(r11188866);
double r11188868 = r11188860 - r11188867;
return r11188868;
}
double f(double x) {
double r11188869 = 0.5;
double r11188870 = 1.0;
double r11188871 = r11188869 * r11188870;
double r11188872 = x;
double r11188873 = hypot(r11188870, r11188872);
double r11188874 = r11188871 / r11188873;
double r11188875 = r11188874 + r11188871;
double r11188876 = sqrt(r11188875);
double r11188877 = fma(r11188870, r11188870, r11188875);
double r11188878 = fma(r11188876, r11188870, r11188877);
double r11188879 = r11188870 * r11188870;
double r11188880 = r11188870 * r11188879;
double r11188881 = r11188878 * r11188880;
double r11188882 = r11188876 * r11188875;
double r11188883 = r11188878 * r11188882;
double r11188884 = r11188881 - r11188883;
double r11188885 = r11188878 * r11188878;
double r11188886 = r11188884 / r11188885;
return r11188886;
}



Bits error versus x
Initial program 15.4
rmApplied flip3--15.7
Simplified15.4
Simplified14.9
rmApplied div-sub14.9
rmApplied frac-sub14.9
Final simplification14.9
herbie shell --seed 2019169 +o rules:numerics
(FPCore (x)
:name "Given's Rotation SVD example, simplified"
(- 1.0 (sqrt (* 0.5 (+ 1.0 (/ 1.0 (hypot 1.0 x)))))))