1 - \sqrt{\frac{1}{2} \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}\frac{\frac{\frac{1}{512} - {\left(\frac{1}{\mathsf{hypot}\left(1, x\right)} \cdot \frac{\frac{1}{8}}{\mathsf{hypot}\left(1, x\right) \cdot \mathsf{hypot}\left(1, x\right)}\right)}^{3}}{\left(\left(\frac{1}{2} + \frac{\frac{1}{2}}{\mathsf{hypot}\left(1, x\right)}\right) \cdot \frac{\frac{1}{2}}{\mathsf{hypot}\left(1, x\right)} + \frac{1}{4}\right) \cdot \left(\left(\left(\frac{1}{\mathsf{hypot}\left(1, x\right)} \cdot \frac{\frac{1}{8}}{\mathsf{hypot}\left(1, x\right) \cdot \mathsf{hypot}\left(1, x\right)}\right) \cdot \frac{1}{8} + \left(\frac{1}{\mathsf{hypot}\left(1, x\right)} \cdot \frac{\frac{1}{8}}{\mathsf{hypot}\left(1, x\right) \cdot \mathsf{hypot}\left(1, x\right)}\right) \cdot \left(\frac{1}{\mathsf{hypot}\left(1, x\right)} \cdot \frac{\frac{1}{8}}{\mathsf{hypot}\left(1, x\right) \cdot \mathsf{hypot}\left(1, x\right)}\right)\right) + \frac{1}{64}\right)}}{1 + \sqrt{\frac{1}{2} + \frac{\frac{1}{2}}{\mathsf{hypot}\left(1, x\right)}}}double f(double x) {
double r5661494 = 1.0;
double r5661495 = 0.5;
double r5661496 = x;
double r5661497 = hypot(r5661494, r5661496);
double r5661498 = r5661494 / r5661497;
double r5661499 = r5661494 + r5661498;
double r5661500 = r5661495 * r5661499;
double r5661501 = sqrt(r5661500);
double r5661502 = r5661494 - r5661501;
return r5661502;
}
double f(double x) {
double r5661503 = 0.001953125;
double r5661504 = 1.0;
double r5661505 = x;
double r5661506 = hypot(r5661504, r5661505);
double r5661507 = r5661504 / r5661506;
double r5661508 = 0.125;
double r5661509 = r5661506 * r5661506;
double r5661510 = r5661508 / r5661509;
double r5661511 = r5661507 * r5661510;
double r5661512 = 3.0;
double r5661513 = pow(r5661511, r5661512);
double r5661514 = r5661503 - r5661513;
double r5661515 = 0.5;
double r5661516 = r5661515 / r5661506;
double r5661517 = r5661515 + r5661516;
double r5661518 = r5661517 * r5661516;
double r5661519 = 0.25;
double r5661520 = r5661518 + r5661519;
double r5661521 = r5661511 * r5661508;
double r5661522 = r5661511 * r5661511;
double r5661523 = r5661521 + r5661522;
double r5661524 = 0.015625;
double r5661525 = r5661523 + r5661524;
double r5661526 = r5661520 * r5661525;
double r5661527 = r5661514 / r5661526;
double r5661528 = sqrt(r5661517);
double r5661529 = r5661504 + r5661528;
double r5661530 = r5661527 / r5661529;
return r5661530;
}



Bits error versus x
Results
Initial program 15.1
Simplified15.1
rmApplied flip--15.1
Simplified14.6
rmApplied flip3--14.6
Simplified14.6
Simplified14.6
rmApplied *-un-lft-identity14.6
Applied times-frac14.6
rmApplied flip3--14.6
Applied associate-/l/14.6
Final simplification14.6
herbie shell --seed 2019138
(FPCore (x)
:name "Given's Rotation SVD example, simplified"
(- 1 (sqrt (* 1/2 (+ 1 (/ 1 (hypot 1 x)))))))