{x}^{4} - {y}^{4}
\begin{array}{l}
\mathbf{if}\;{y}^{4} \leq 1.415955287042566 \cdot 10^{+284}:\\
\;\;\;\;{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.415955287042566e+284) (- (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.415955287042566e+284) {
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.41595528704256602e284Initial program 0.0
if 1.41595528704256602e284 < (pow.f64 y 4) Initial program 22.0
Taylor expanded in x around 0 11.2
Simplified11.2
Final simplification4.4
herbie shell --seed 2022088
(FPCore (x y)
:name "Radioactive exchange between two surfaces"
:precision binary64
(- (pow x 4.0) (pow y 4.0)))