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 r4803999 = 1.0;
double r4804000 = 0.5;
double r4804001 = x;
double r4804002 = hypot(r4803999, r4804001);
double r4804003 = r4803999 / r4804002;
double r4804004 = r4803999 + r4804003;
double r4804005 = r4804000 * r4804004;
double r4804006 = sqrt(r4804005);
double r4804007 = r4803999 - r4804006;
return r4804007;
}
double f(double x) {
double r4804008 = 1.0;
double r4804009 = r4804008 * r4804008;
double r4804010 = r4804008 * r4804009;
double r4804011 = 0.5;
double r4804012 = x;
double r4804013 = hypot(r4804008, r4804012);
double r4804014 = r4804008 / r4804013;
double r4804015 = r4804014 + r4804008;
double r4804016 = r4804011 * r4804015;
double r4804017 = sqrt(r4804016);
double r4804018 = r4804017 * r4804016;
double r4804019 = r4804010 - r4804018;
double r4804020 = r4804008 + r4804017;
double r4804021 = r4804020 * r4804008;
double r4804022 = r4804021 + r4804016;
double r4804023 = r4804019 / r4804022;
double r4804024 = sqrt(r4804023);
double r4804025 = r4804024 * r4804024;
return r4804025;
}



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