\sqrt{2 \cdot {x}^{2}}
\begin{array}{l}
\mathbf{if}\;x \leq 6.07190567874543 \cdot 10^{-310}:\\
\;\;\;\;-x \cdot \sqrt{2}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{x} \cdot {\left(x \cdot 2\right)}^{0.5}\\
\end{array}
(FPCore (x) :precision binary64 (sqrt (* 2.0 (pow x 2.0))))
(FPCore (x) :precision binary64 (if (<= x 6.07190567874543e-310) (- (* x (sqrt 2.0))) (* (sqrt x) (pow (* x 2.0) 0.5))))
double code(double x) {
return sqrt((2.0 * pow(x, 2.0)));
}
double code(double x) {
double tmp;
if (x <= 6.07190567874543e-310) {
tmp = -(x * sqrt(2.0));
} else {
tmp = sqrt(x) * pow((x * 2.0), 0.5);
}
return tmp;
}



Bits error versus x
Results
if x < 6.071905678745428e-310Initial program 30.4
Taylor expanded in x around -inf 0.4
Simplified0.4
if 6.071905678745428e-310 < x Initial program 30.3
Applied egg-rr0.3
Final simplification0.4
herbie shell --seed 2022130
(FPCore (x)
:name "sqrt D"
:precision binary64
(sqrt (* 2.0 (pow x 2.0))))