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(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)} \cdot \left(0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)\right)}{\left(1 + \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}\right) \cdot 1 + 0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}} \cdot \sqrt{\frac{1 \cdot \left(1 \cdot 1\right) - \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)} \cdot \left(0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)\right)}{\left(1 + \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}\right) \cdot 1 + 0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}}double f(double x) {
double r8662210 = 1.0;
double r8662211 = 0.5;
double r8662212 = x;
double r8662213 = hypot(r8662210, r8662212);
double r8662214 = r8662210 / r8662213;
double r8662215 = r8662210 + r8662214;
double r8662216 = r8662211 * r8662215;
double r8662217 = sqrt(r8662216);
double r8662218 = r8662210 - r8662217;
return r8662218;
}
double f(double x) {
double r8662219 = 1.0;
double r8662220 = r8662219 * r8662219;
double r8662221 = r8662219 * r8662220;
double r8662222 = 0.5;
double r8662223 = x;
double r8662224 = hypot(r8662219, r8662223);
double r8662225 = r8662219 / r8662224;
double r8662226 = r8662219 + r8662225;
double r8662227 = r8662222 * r8662226;
double r8662228 = sqrt(r8662227);
double r8662229 = r8662228 * r8662227;
double r8662230 = r8662221 - r8662229;
double r8662231 = r8662219 + r8662228;
double r8662232 = r8662231 * r8662219;
double r8662233 = r8662232 + r8662227;
double r8662234 = r8662230 / r8662233;
double r8662235 = sqrt(r8662234);
double r8662236 = r8662235 * r8662235;
return r8662236;
}



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