1 - \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}\sqrt{\frac{1 \cdot \left(1 \cdot 1\right) - \sqrt{0.5 \cdot \left(\frac{1}{\mathsf{hypot}\left(1, x\right)} + 1\right)} \cdot \left(0.5 \cdot \left(\frac{1}{\mathsf{hypot}\left(1, x\right)} + 1\right)\right)}{\left(1 + \sqrt{0.5 \cdot \left(\frac{1}{\mathsf{hypot}\left(1, x\right)} + 1\right)}\right) \cdot 1 + 0.5 \cdot \left(\frac{1}{\mathsf{hypot}\left(1, x\right)} + 1\right)}} \cdot \sqrt{\frac{1 \cdot \left(1 \cdot 1\right) - \sqrt{0.5 \cdot \left(\frac{1}{\mathsf{hypot}\left(1, x\right)} + 1\right)} \cdot \left(0.5 \cdot \left(\frac{1}{\mathsf{hypot}\left(1, x\right)} + 1\right)\right)}{\left(1 + \sqrt{0.5 \cdot \left(\frac{1}{\mathsf{hypot}\left(1, x\right)} + 1\right)}\right) \cdot 1 + 0.5 \cdot \left(\frac{1}{\mathsf{hypot}\left(1, x\right)} + 1\right)}}double f(double x) {
double r4803997 = 1.0;
double r4803998 = 0.5;
double r4803999 = x;
double r4804000 = hypot(r4803997, r4803999);
double r4804001 = r4803997 / r4804000;
double r4804002 = r4803997 + r4804001;
double r4804003 = r4803998 * r4804002;
double r4804004 = sqrt(r4804003);
double r4804005 = r4803997 - r4804004;
return r4804005;
}
double f(double x) {
double r4804006 = 1.0;
double r4804007 = r4804006 * r4804006;
double r4804008 = r4804006 * r4804007;
double r4804009 = 0.5;
double r4804010 = x;
double r4804011 = hypot(r4804006, r4804010);
double r4804012 = r4804006 / r4804011;
double r4804013 = r4804012 + r4804006;
double r4804014 = r4804009 * r4804013;
double r4804015 = sqrt(r4804014);
double r4804016 = r4804015 * r4804014;
double r4804017 = r4804008 - r4804016;
double r4804018 = r4804006 + r4804015;
double r4804019 = r4804018 * r4804006;
double r4804020 = r4804019 + r4804014;
double r4804021 = r4804017 / r4804020;
double r4804022 = sqrt(r4804021);
double r4804023 = r4804022 * r4804022;
return r4804023;
}



Bits error versus x
Results
Initial program 15.6
rmApplied flip3--15.9
Simplified15.6
Simplified15.2
rmApplied add-sqr-sqrt15.2
Final simplification15.2
herbie shell --seed 2019172
(FPCore (x)
:name "Given's Rotation SVD example, simplified"
(- 1.0 (sqrt (* 0.5 (+ 1.0 (/ 1.0 (hypot 1.0 x)))))))