\sqrt{{x}^{2} + {x}^{2}}
\mathsf{hypot}\left(x, x\right)
(FPCore (x) :precision binary64 (sqrt (+ (pow x 2.0) (pow x 2.0))))
(FPCore (x) :precision binary64 (hypot x x))
double code(double x) {
return sqrt((pow(x, 2.0) + pow(x, 2.0)));
}
double code(double x) {
return hypot(x, x);
}



Bits error versus x
Results
Initial program 29.9
Applied egg-rr0.1
Final simplification0.1
herbie shell --seed 2022129
(FPCore (x)
:name "sqrt E"
:precision binary64
(sqrt (+ (pow x 2.0) (pow x 2.0))))