Math FPCore C Fortran Java Python Julia MATLAB Wolfram TeX \[{x}^{4} - {y}^{4}
\]
↓
\[\begin{array}{l}
t_0 := x \cdot x + y \cdot y\\
\mathbf{if}\;x \leq 5.8 \cdot 10^{+145}:\\
\;\;\;\;t_0 \cdot \left(x \cdot x - y \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot x\right) \cdot t_0\\
\end{array}
\]
(FPCore (x y) :precision binary64 (- (pow x 4.0) (pow y 4.0))) ↓
(FPCore (x y)
:precision binary64
(let* ((t_0 (+ (* x x) (* y y))))
(if (<= x 5.8e+145) (* t_0 (- (* x x) (* y y))) (* (* x x) t_0)))) double code(double x, double y) {
return pow(x, 4.0) - pow(y, 4.0);
}
↓
double code(double x, double y) {
double t_0 = (x * x) + (y * y);
double tmp;
if (x <= 5.8e+145) {
tmp = t_0 * ((x * x) - (y * y));
} else {
tmp = (x * x) * t_0;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (x ** 4.0d0) - (y ** 4.0d0)
end function
↓
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = (x * x) + (y * y)
if (x <= 5.8d+145) then
tmp = t_0 * ((x * x) - (y * y))
else
tmp = (x * x) * t_0
end if
code = tmp
end function
public static double code(double x, double y) {
return Math.pow(x, 4.0) - Math.pow(y, 4.0);
}
↓
public static double code(double x, double y) {
double t_0 = (x * x) + (y * y);
double tmp;
if (x <= 5.8e+145) {
tmp = t_0 * ((x * x) - (y * y));
} else {
tmp = (x * x) * t_0;
}
return tmp;
}
def code(x, y):
return math.pow(x, 4.0) - math.pow(y, 4.0)
↓
def code(x, y):
t_0 = (x * x) + (y * y)
tmp = 0
if x <= 5.8e+145:
tmp = t_0 * ((x * x) - (y * y))
else:
tmp = (x * x) * t_0
return tmp
function code(x, y)
return Float64((x ^ 4.0) - (y ^ 4.0))
end
↓
function code(x, y)
t_0 = Float64(Float64(x * x) + Float64(y * y))
tmp = 0.0
if (x <= 5.8e+145)
tmp = Float64(t_0 * Float64(Float64(x * x) - Float64(y * y)));
else
tmp = Float64(Float64(x * x) * t_0);
end
return tmp
end
function tmp = code(x, y)
tmp = (x ^ 4.0) - (y ^ 4.0);
end
↓
function tmp_2 = code(x, y)
t_0 = (x * x) + (y * y);
tmp = 0.0;
if (x <= 5.8e+145)
tmp = t_0 * ((x * x) - (y * y));
else
tmp = (x * x) * t_0;
end
tmp_2 = tmp;
end
code[x_, y_] := N[(N[Power[x, 4.0], $MachinePrecision] - N[Power[y, 4.0], $MachinePrecision]), $MachinePrecision]
↓
code[x_, y_] := Block[{t$95$0 = N[(N[(x * x), $MachinePrecision] + N[(y * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 5.8e+145], N[(t$95$0 * N[(N[(x * x), $MachinePrecision] - N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * x), $MachinePrecision] * t$95$0), $MachinePrecision]]]
{x}^{4} - {y}^{4}
↓
\begin{array}{l}
t_0 := x \cdot x + y \cdot y\\
\mathbf{if}\;x \leq 5.8 \cdot 10^{+145}:\\
\;\;\;\;t_0 \cdot \left(x \cdot x - y \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot x\right) \cdot t_0\\
\end{array}
Alternatives Alternative 1 Accuracy 94.7% Cost 1092
\[\begin{array}{l}
t_0 := x \cdot x + y \cdot y\\
\mathbf{if}\;x \leq 5.8 \cdot 10^{+145}:\\
\;\;\;\;t_0 \cdot \left(x \cdot x - y \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot x\right) \cdot t_0\\
\end{array}
\]
Alternative 2 Accuracy 79.3% Cost 1033
\[\begin{array}{l}
\mathbf{if}\;y \leq -1.95 \cdot 10^{+109} \lor \neg \left(y \leq 1.05 \cdot 10^{-57}\right):\\
\;\;\;\;\left(y \cdot y\right) \cdot \left(y \cdot \left(-y\right) - x \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot x\right) \cdot \left(x \cdot x + y \cdot y\right)\\
\end{array}
\]
Alternative 3 Accuracy 69.0% Cost 969
\[\begin{array}{l}
\mathbf{if}\;y \leq -3.1 \cdot 10^{+110} \lor \neg \left(y \leq 1.22 \cdot 10^{+126}\right):\\
\;\;\;\;\left(x \cdot x\right) \cdot \left(y \cdot \left(-y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot x\right) \cdot \left(x \cdot x + y \cdot y\right)\\
\end{array}
\]
Alternative 4 Accuracy 44.6% Cost 777
\[\begin{array}{l}
\mathbf{if}\;y \leq -4.8 \cdot 10^{+109} \lor \neg \left(y \leq 1.25 \cdot 10^{+126}\right):\\
\;\;\;\;\left(x \cdot x\right) \cdot \left(y \cdot \left(-y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot x\right) \cdot \left(y \cdot y\right)\\
\end{array}
\]
Alternative 5 Accuracy 33.3% Cost 448
\[\left(x \cdot x\right) \cdot \left(y \cdot y\right)
\]