1 - \sqrt{\frac{1}{2} \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}\frac{\frac{\sqrt[3]{\frac{1}{4} - \frac{\frac{\frac{1}{2}}{\sqrt{\mathsf{hypot}\left(1, x\right)}}}{\mathsf{hypot}\left(1, x\right)} \cdot \frac{\frac{1}{2}}{\sqrt{\mathsf{hypot}\left(1, x\right)}}} \cdot \left(\sqrt[3]{\frac{1}{4} - \frac{\frac{\frac{1}{2}}{\sqrt{\mathsf{hypot}\left(1, x\right)}}}{\mathsf{hypot}\left(1, x\right)} \cdot \frac{\frac{1}{2}}{\sqrt{\mathsf{hypot}\left(1, x\right)}}} \cdot \sqrt[3]{\frac{1}{4} - \frac{\frac{\frac{1}{2}}{\sqrt{\mathsf{hypot}\left(1, x\right)}}}{\mathsf{hypot}\left(1, x\right)} \cdot \frac{\frac{1}{2}}{\sqrt{\mathsf{hypot}\left(1, x\right)}}}\right)}{\frac{\frac{1}{2}}{\mathsf{hypot}\left(1, x\right)} + \frac{1}{2}}}{\sqrt{\frac{\frac{1}{2}}{\mathsf{hypot}\left(1, x\right)} + \frac{1}{2}} + 1}double f(double x) {
double r4139473 = 1.0;
double r4139474 = 0.5;
double r4139475 = x;
double r4139476 = hypot(r4139473, r4139475);
double r4139477 = r4139473 / r4139476;
double r4139478 = r4139473 + r4139477;
double r4139479 = r4139474 * r4139478;
double r4139480 = sqrt(r4139479);
double r4139481 = r4139473 - r4139480;
return r4139481;
}
double f(double x) {
double r4139482 = 0.25;
double r4139483 = 0.5;
double r4139484 = 1.0;
double r4139485 = x;
double r4139486 = hypot(r4139484, r4139485);
double r4139487 = sqrt(r4139486);
double r4139488 = r4139483 / r4139487;
double r4139489 = r4139488 / r4139486;
double r4139490 = r4139489 * r4139488;
double r4139491 = r4139482 - r4139490;
double r4139492 = cbrt(r4139491);
double r4139493 = r4139492 * r4139492;
double r4139494 = r4139492 * r4139493;
double r4139495 = r4139483 / r4139486;
double r4139496 = r4139495 + r4139483;
double r4139497 = r4139494 / r4139496;
double r4139498 = sqrt(r4139496);
double r4139499 = r4139498 + r4139484;
double r4139500 = r4139497 / r4139499;
return r4139500;
}



Bits error versus x
Results
Initial program 15.7
Simplified15.7
rmApplied flip--15.7
Simplified15.2
rmApplied flip--15.2
rmApplied add-sqr-sqrt15.2
Applied *-un-lft-identity15.2
Applied times-frac15.2
Applied associate-*r*15.2
Simplified15.2
rmApplied add-cube-cbrt15.2
Final simplification15.2
herbie shell --seed 2019144
(FPCore (x)
:name "Given's Rotation SVD example, simplified"
(- 1 (sqrt (* 1/2 (+ 1 (/ 1 (hypot 1 x)))))))