x \cdot x - y \cdot y
\begin{array}{l}
\mathbf{if}\;x \cdot x \leq 3.6361091965505894 \cdot 10^{+301}:\\
\;\;\;\;x \cdot x - y \cdot y\\
\mathbf{else}:\\
\;\;\;\;{x}^{2}\\
\end{array}
(FPCore (x y) :precision binary64 (- (* x x) (* y y)))
(FPCore (x y) :precision binary64 (if (<= (* x x) 3.6361091965505894e+301) (- (* x x) (* y y)) (pow x 2.0)))
double code(double x, double y) {
return (x * x) - (y * y);
}
double code(double x, double y) {
double tmp;
if ((x * x) <= 3.6361091965505894e+301) {
tmp = (x * x) - (y * y);
} else {
tmp = pow(x, 2.0);
}
return tmp;
}



Bits error versus x



Bits error versus y
Results
if (*.f64 x x) < 3.63610919655058944e301Initial program 0.0
if 3.63610919655058944e301 < (*.f64 x x) Initial program 15.4
Taylor expanded in x around inf 8.3
Final simplification2.1
herbie shell --seed 2022068
(FPCore (x y)
:name "Examples.Basics.BasicTests:f2 from sbv-4.4"
:precision binary64
(- (* x x) (* y y)))