Math FPCore C Fortran Java Python Julia MATLAB Wolfram TeX \[{x}^{4} - {y}^{4}
\]
↓
\[\left(x \cdot x + y \cdot y\right) \cdot \left(\left(x - y\right) \cdot \left(x + y\right)\right)
\]
(FPCore (x y) :precision binary64 (- (pow x 4.0) (pow y 4.0))) ↓
(FPCore (x y) :precision binary64 (* (+ (* x x) (* y y)) (* (- x y) (+ x y)))) double code(double x, double y) {
return pow(x, 4.0) - pow(y, 4.0);
}
↓
double code(double x, double y) {
return ((x * x) + (y * y)) * ((x - y) * (x + y));
}
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
code = ((x * x) + (y * y)) * ((x - y) * (x + y))
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) {
return ((x * x) + (y * y)) * ((x - y) * (x + y));
}
def code(x, y):
return math.pow(x, 4.0) - math.pow(y, 4.0)
↓
def code(x, y):
return ((x * x) + (y * y)) * ((x - y) * (x + y))
function code(x, y)
return Float64((x ^ 4.0) - (y ^ 4.0))
end
↓
function code(x, y)
return Float64(Float64(Float64(x * x) + Float64(y * y)) * Float64(Float64(x - y) * Float64(x + y)))
end
function tmp = code(x, y)
tmp = (x ^ 4.0) - (y ^ 4.0);
end
↓
function tmp = code(x, y)
tmp = ((x * x) + (y * y)) * ((x - y) * (x + y));
end
code[x_, y_] := N[(N[Power[x, 4.0], $MachinePrecision] - N[Power[y, 4.0], $MachinePrecision]), $MachinePrecision]
↓
code[x_, y_] := N[(N[(N[(x * x), $MachinePrecision] + N[(y * y), $MachinePrecision]), $MachinePrecision] * N[(N[(x - y), $MachinePrecision] * N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
{x}^{4} - {y}^{4}
↓
\left(x \cdot x + y \cdot y\right) \cdot \left(\left(x - y\right) \cdot \left(x + y\right)\right)
Alternatives Alternative 1 Accuracy 94.2% Cost 969
\[\begin{array}{l}
\mathbf{if}\;y \leq -7.4 \cdot 10^{-37} \lor \neg \left(y \leq 7.2 \cdot 10^{-60}\right):\\
\;\;\;\;\left(y \cdot y\right) \cdot \left(\left(x - y\right) \cdot \left(x + y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot x\right) \cdot \left(x \cdot x + y \cdot y\right)\\
\end{array}
\]
Alternative 2 Accuracy 76.1% Cost 841
\[\begin{array}{l}
\mathbf{if}\;x \leq -1.1 \cdot 10^{+154} \lor \neg \left(x \leq 3.6 \cdot 10^{+155}\right):\\
\;\;\;\;y \cdot \left(\left(x \cdot x\right) \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{\frac{\frac{-1}{y \cdot y}}{y}}\\
\end{array}
\]
Alternative 3 Accuracy 76.0% Cost 836
\[\begin{array}{l}
\mathbf{if}\;x \leq 6.2 \cdot 10^{+156}:\\
\;\;\;\;\left(y \cdot y\right) \cdot \left(\left(x - y\right) \cdot \left(x + y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(\left(x \cdot x\right) \cdot y\right)\\
\end{array}
\]
Alternative 4 Accuracy 76.1% Cost 777
\[\begin{array}{l}
\mathbf{if}\;x \leq -1.22 \cdot 10^{+154} \lor \neg \left(x \leq 3.6 \cdot 10^{+155}\right):\\
\;\;\;\;y \cdot \left(\left(x \cdot x\right) \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;\left(y \cdot y\right) \cdot \left(y \cdot \left(-y\right)\right)\\
\end{array}
\]
Alternative 5 Accuracy 29.0% Cost 448
\[x \cdot \left(x \cdot \left(y \cdot y\right)\right)
\]
Alternative 6 Accuracy 29.1% Cost 448
\[x \cdot \left(y \cdot \left(x \cdot y\right)\right)
\]
Alternative 7 Accuracy 38.9% Cost 448
\[y \cdot \left(\left(x \cdot x\right) \cdot y\right)
\]