{x}^{4} - {y}^{4}
\begin{array}{l}
\mathbf{if}\;{y}^{4} \leq 1.7821335287406645 \cdot 10^{+308}:\\
\;\;\;\;{x}^{4} - {y}^{4}\\
\mathbf{else}:\\
\;\;\;\;-{y}^{4}\\
\end{array}
(FPCore (x y) :precision binary64 (- (pow x 4.0) (pow y 4.0)))
(FPCore (x y) :precision binary64 (if (<= (pow y 4.0) 1.7821335287406645e+308) (- (pow x 4.0) (pow y 4.0)) (- (pow y 4.0))))
double code(double x, double y) {
return pow(x, 4.0) - pow(y, 4.0);
}
double code(double x, double y) {
double tmp;
if (pow(y, 4.0) <= 1.7821335287406645e+308) {
tmp = pow(x, 4.0) - pow(y, 4.0);
} else {
tmp = -pow(y, 4.0);
}
return tmp;
}



Bits error versus x



Bits error versus y
Results
if (pow.f64 y 4) < 1.78213352874066454e308Initial program 0.0
if 1.78213352874066454e308 < (pow.f64 y 4) Initial program 24.5
Taylor expanded in x around 0 12.4
Final simplification4.7
herbie shell --seed 2022067
(FPCore (x y)
:name "Radioactive exchange between two surfaces"
:precision binary64
(- (pow x 4.0) (pow y 4.0)))