\mathsf{copysign}\left(\sqrt{\frac{\mathsf{hypot}\left(a, b\right) - a}{2}}, b\right)\mathsf{copysign}\left(\sqrt{\frac{\mathsf{hypot}\left(a, b\right) - a}{2}}, b\right)double code(double a, double b) {
return ((double) copysign(((double) sqrt(((double) (((double) (((double) hypot(a, b)) - a)) / 2.0)))), b));
}
double code(double a, double b) {
return ((double) copysign(((double) sqrt(((double) (((double) (((double) hypot(a, b)) - a)) / 2.0)))), b));
}



Bits error versus a



Bits error versus b
Results
Initial program 13.3
Final simplification13.3
herbie shell --seed 2020153
(FPCore (a b)
:name "(copysign (sqrt (/ (- (hypot a b) a) 2)) b)"
:precision binary64
(copysign (sqrt (/ (- (hypot a b) a) 2.0)) b))