Math FPCore C Fortran Java Python Julia MATLAB Wolfram TeX \[x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)
\]
↓
\[x \cdot x + 4 \cdot \left(y \cdot t - z \cdot \left(z \cdot y\right)\right)
\]
(FPCore (x y z t) :precision binary64 (- (* x x) (* (* y 4.0) (- (* z z) t)))) ↓
(FPCore (x y z t)
:precision binary64
(+ (* x x) (* 4.0 (- (* y t) (* z (* z y)))))) double code(double x, double y, double z, double t) {
return (x * x) - ((y * 4.0) * ((z * z) - t));
}
↓
double code(double x, double y, double z, double t) {
return (x * x) + (4.0 * ((y * t) - (z * (z * y))));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x * x) - ((y * 4.0d0) * ((z * z) - t))
end function
↓
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x * x) + (4.0d0 * ((y * t) - (z * (z * y))))
end function
public static double code(double x, double y, double z, double t) {
return (x * x) - ((y * 4.0) * ((z * z) - t));
}
↓
public static double code(double x, double y, double z, double t) {
return (x * x) + (4.0 * ((y * t) - (z * (z * y))));
}
def code(x, y, z, t):
return (x * x) - ((y * 4.0) * ((z * z) - t))
↓
def code(x, y, z, t):
return (x * x) + (4.0 * ((y * t) - (z * (z * y))))
function code(x, y, z, t)
return Float64(Float64(x * x) - Float64(Float64(y * 4.0) * Float64(Float64(z * z) - t)))
end
↓
function code(x, y, z, t)
return Float64(Float64(x * x) + Float64(4.0 * Float64(Float64(y * t) - Float64(z * Float64(z * y)))))
end
function tmp = code(x, y, z, t)
tmp = (x * x) - ((y * 4.0) * ((z * z) - t));
end
↓
function tmp = code(x, y, z, t)
tmp = (x * x) + (4.0 * ((y * t) - (z * (z * y))));
end
code[x_, y_, z_, t_] := N[(N[(x * x), $MachinePrecision] - N[(N[(y * 4.0), $MachinePrecision] * N[(N[(z * z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
↓
code[x_, y_, z_, t_] := N[(N[(x * x), $MachinePrecision] + N[(4.0 * N[(N[(y * t), $MachinePrecision] - N[(z * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)
↓
x \cdot x + 4 \cdot \left(y \cdot t - z \cdot \left(z \cdot y\right)\right)
Alternatives Alternative 1 Accuracy 98.4% Cost 2121
\[\begin{array}{l}
t_1 := z \cdot z - t\\
t_2 := \left(4 \cdot y\right) \cdot t_1\\
\mathbf{if}\;t_2 \leq -\infty \lor \neg \left(t_2 \leq 2 \cdot 10^{+277}\right):\\
\;\;\;\;x \cdot x + \left(z \cdot \left(z \cdot y\right)\right) \cdot -4\\
\mathbf{else}:\\
\;\;\;\;x \cdot x + y \cdot \left(t_1 \cdot -4\right)\\
\end{array}
\]
Alternative 2 Accuracy 87.1% Cost 1496
\[\begin{array}{l}
t_1 := y \cdot \left(z \cdot z\right)\\
t_2 := x \cdot x + -4 \cdot t_1\\
t_3 := z \cdot \left(z \cdot \left(y \cdot -4\right)\right)\\
t_4 := x \cdot x + t \cdot \left(4 \cdot y\right)\\
\mathbf{if}\;z \leq -1 \cdot 10^{+119}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;z \leq -2.9 \cdot 10^{-33}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 1.48 \cdot 10^{-18}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;z \leq 210000000:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 7.6 \cdot 10^{+52}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;z \leq 7 \cdot 10^{+139}:\\
\;\;\;\;4 \cdot \left(y \cdot t - t_1\right)\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\]
Alternative 3 Accuracy 85.1% Cost 1364
\[\begin{array}{l}
t_1 := x \cdot x + t \cdot \left(4 \cdot y\right)\\
t_2 := z \cdot \left(z \cdot \left(y \cdot -4\right)\right)\\
\mathbf{if}\;z \leq -3.8 \cdot 10^{+56}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{-21}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{+26}:\\
\;\;\;\;\left(4 \cdot y\right) \cdot \left(t - z \cdot z\right)\\
\mathbf{elif}\;z \leq 7.6 \cdot 10^{+52}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 7 \cdot 10^{+139}:\\
\;\;\;\;4 \cdot \left(y \cdot t - y \cdot \left(z \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
Alternative 4 Accuracy 88.8% Cost 1364
\[\begin{array}{l}
t_1 := x \cdot x + t \cdot \left(4 \cdot y\right)\\
t_2 := x \cdot x + \left(z \cdot \left(z \cdot y\right)\right) \cdot -4\\
t_3 := y \cdot \left(z \cdot z\right)\\
\mathbf{if}\;z \leq -6.1 \cdot 10^{-35}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 3.6 \cdot 10^{-19}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{+16}:\\
\;\;\;\;x \cdot x + -4 \cdot t_3\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{+56}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 7.7 \cdot 10^{+133}:\\
\;\;\;\;4 \cdot \left(y \cdot t - t_3\right)\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
Alternative 5 Accuracy 57.9% Cost 1240
\[\begin{array}{l}
t_1 := 4 \cdot \left(y \cdot t\right)\\
t_2 := z \cdot \left(z \cdot \left(y \cdot -4\right)\right)\\
\mathbf{if}\;z \leq -8 \cdot 10^{+38}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -3.5 \cdot 10^{-47}:\\
\;\;\;\;x \cdot x\\
\mathbf{elif}\;z \leq 2.4 \cdot 10^{-19}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1160000000000:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 1.45 \cdot 10^{+25}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{+56}:\\
\;\;\;\;x \cdot x\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
Alternative 6 Accuracy 85.1% Cost 1236
\[\begin{array}{l}
t_1 := x \cdot x + t \cdot \left(4 \cdot y\right)\\
t_2 := z \cdot \left(z \cdot \left(y \cdot -4\right)\right)\\
t_3 := \left(4 \cdot y\right) \cdot \left(t - z \cdot z\right)\\
\mathbf{if}\;z \leq -2.8 \cdot 10^{+57}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 5.5 \cdot 10^{-21}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.52 \cdot 10^{+26}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;z \leq 7.6 \cdot 10^{+52}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{+139}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
Alternative 7 Accuracy 57.9% Cost 850
\[\begin{array}{l}
\mathbf{if}\;x \leq -4.2 \cdot 10^{+44} \lor \neg \left(x \leq 1000000000000\right) \land \left(x \leq 1.1 \cdot 10^{+50} \lor \neg \left(x \leq 2.05 \cdot 10^{+80}\right)\right):\\
\;\;\;\;x \cdot x\\
\mathbf{else}:\\
\;\;\;\;4 \cdot \left(y \cdot t\right)\\
\end{array}
\]
Alternative 8 Accuracy 74.3% Cost 848
\[\begin{array}{l}
\mathbf{if}\;x \leq -4.2 \cdot 10^{+44}:\\
\;\;\;\;x \cdot x\\
\mathbf{elif}\;x \leq 5.6 \cdot 10^{-22}:\\
\;\;\;\;\left(4 \cdot y\right) \cdot \left(t - z \cdot z\right)\\
\mathbf{elif}\;x \leq 8 \cdot 10^{+49}:\\
\;\;\;\;x \cdot x\\
\mathbf{elif}\;x \leq 2.05 \cdot 10^{+80}:\\
\;\;\;\;4 \cdot \left(y \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot x\\
\end{array}
\]
Alternative 9 Accuracy 36.0% Cost 192
\[x \cdot x
\]