Math FPCore C Fortran Java Python Julia MATLAB Wolfram TeX \[\left(x \cdot 2 + x \cdot x\right) + y \cdot y
\]
↓
\[\left(x \cdot x + x \cdot 2\right) + y \cdot y
\]
(FPCore (x y) :precision binary64 (+ (+ (* x 2.0) (* x x)) (* y y))) ↓
(FPCore (x y) :precision binary64 (+ (+ (* x x) (* x 2.0)) (* y y))) double code(double x, double y) {
return ((x * 2.0) + (x * x)) + (y * y);
}
↓
double code(double x, double y) {
return ((x * x) + (x * 2.0)) + (y * y);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = ((x * 2.0d0) + (x * x)) + (y * y)
end function
↓
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = ((x * x) + (x * 2.0d0)) + (y * y)
end function
public static double code(double x, double y) {
return ((x * 2.0) + (x * x)) + (y * y);
}
↓
public static double code(double x, double y) {
return ((x * x) + (x * 2.0)) + (y * y);
}
def code(x, y):
return ((x * 2.0) + (x * x)) + (y * y)
↓
def code(x, y):
return ((x * x) + (x * 2.0)) + (y * y)
function code(x, y)
return Float64(Float64(Float64(x * 2.0) + Float64(x * x)) + Float64(y * y))
end
↓
function code(x, y)
return Float64(Float64(Float64(x * x) + Float64(x * 2.0)) + Float64(y * y))
end
function tmp = code(x, y)
tmp = ((x * 2.0) + (x * x)) + (y * y);
end
↓
function tmp = code(x, y)
tmp = ((x * x) + (x * 2.0)) + (y * y);
end
code[x_, y_] := N[(N[(N[(x * 2.0), $MachinePrecision] + N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(y * y), $MachinePrecision]), $MachinePrecision]
↓
code[x_, y_] := N[(N[(N[(x * x), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision] + N[(y * y), $MachinePrecision]), $MachinePrecision]
\left(x \cdot 2 + x \cdot x\right) + y \cdot y
↓
\left(x \cdot x + x \cdot 2\right) + y \cdot y
Alternatives Alternative 1 Accuracy 100.0% Cost 704
\[\left(x \cdot x + x \cdot 2\right) + y \cdot y
\]
Alternative 2 Accuracy 83.4% Cost 972
\[\begin{array}{l}
\mathbf{if}\;y \cdot y \leq 7 \cdot 10^{+97}:\\
\;\;\;\;x \cdot \left(x + 2\right)\\
\mathbf{elif}\;y \cdot y \leq 3.1 \cdot 10^{+220}:\\
\;\;\;\;y \cdot y\\
\mathbf{elif}\;y \cdot y \leq 1.22 \cdot 10^{+256}:\\
\;\;\;\;x \cdot x\\
\mathbf{else}:\\
\;\;\;\;y \cdot y\\
\end{array}
\]
Alternative 3 Accuracy 69.4% Cost 852
\[\begin{array}{l}
\mathbf{if}\;x \leq -1.65 \cdot 10^{-5}:\\
\;\;\;\;x \cdot x\\
\mathbf{elif}\;x \leq -7.5 \cdot 10^{-177}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;x \leq 9 \cdot 10^{-76}:\\
\;\;\;\;y \cdot y\\
\mathbf{elif}\;x \leq 3.4 \cdot 10^{-22}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;x \leq 1.8 \cdot 10^{+58}:\\
\;\;\;\;y \cdot y\\
\mathbf{else}:\\
\;\;\;\;x \cdot x\\
\end{array}
\]
Alternative 4 Accuracy 89.9% Cost 712
\[\begin{array}{l}
\mathbf{if}\;x \leq -8.6 \cdot 10^{+20}:\\
\;\;\;\;x \cdot x\\
\mathbf{elif}\;x \leq 3.8 \cdot 10^{+59}:\\
\;\;\;\;y \cdot y + \left(x + x\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(x + 2\right)\\
\end{array}
\]
Alternative 5 Accuracy 100.0% Cost 576
\[y \cdot y + x \cdot \left(x + 2\right)
\]
Alternative 6 Accuracy 59.1% Cost 456
\[\begin{array}{l}
\mathbf{if}\;x \leq -1.65 \cdot 10^{-5}:\\
\;\;\;\;x \cdot x\\
\mathbf{elif}\;x \leq 2:\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;x \cdot x\\
\end{array}
\]
Alternative 7 Accuracy 20.6% Cost 192
\[x \cdot 2
\]