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 + \left(y \cdot \left(4 \cdot t\right) + z \cdot \left(z \cdot \left(y \cdot -4\right)\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) (+ (* y (* 4.0 t)) (* z (* z (* y -4.0)))))) 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) + ((y * (4.0 * t)) + (z * (z * (y * -4.0))));
}
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) + ((y * (4.0d0 * t)) + (z * (z * (y * (-4.0d0)))))
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) + ((y * (4.0 * t)) + (z * (z * (y * -4.0))));
}
def code(x, y, z, t):
return (x * x) - ((y * 4.0) * ((z * z) - t))
↓
def code(x, y, z, t):
return (x * x) + ((y * (4.0 * t)) + (z * (z * (y * -4.0))))
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(Float64(y * Float64(4.0 * t)) + Float64(z * Float64(z * Float64(y * -4.0)))))
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) + ((y * (4.0 * t)) + (z * (z * (y * -4.0))));
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[(N[(y * N[(4.0 * t), $MachinePrecision]), $MachinePrecision] + N[(z * N[(z * N[(y * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)
↓
x \cdot x + \left(y \cdot \left(4 \cdot t\right) + z \cdot \left(z \cdot \left(y \cdot -4\right)\right)\right)
Alternatives Alternative 1 Error 8.7 Cost 1224
\[\begin{array}{l}
\mathbf{if}\;z \cdot z \leq 10^{-119}:\\
\;\;\;\;x \cdot x - t \cdot \left(y \cdot -4\right)\\
\mathbf{elif}\;z \cdot z \leq 10^{+292}:\\
\;\;\;\;4 \cdot \left(y \cdot t - y \cdot \left(z \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(z \cdot \left(y \cdot -4\right)\right)\\
\end{array}
\]
Alternative 2 Error 30.9 Cost 1108
\[\begin{array}{l}
t_1 := \left(y \cdot 4\right) \cdot t\\
t_2 := y \cdot \left(\left(z \cdot z\right) \cdot -4\right)\\
\mathbf{if}\;z \leq -6.6 \cdot 10^{+153}:\\
\;\;\;\;x \cdot x\\
\mathbf{elif}\;z \leq -0.86:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 3 \cdot 10^{-298}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 8 \cdot 10^{-283}:\\
\;\;\;\;x \cdot x\\
\mathbf{elif}\;z \leq 10.5:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
Alternative 3 Error 6.8 Cost 1100
\[\begin{array}{l}
t_1 := x \cdot x + \left(z \cdot \left(z \cdot y\right)\right) \cdot -4\\
\mathbf{if}\;z \leq -4.5 \cdot 10^{+85}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -3 \cdot 10^{-46}:\\
\;\;\;\;4 \cdot \left(y \cdot \left(t - z \cdot z\right)\right)\\
\mathbf{elif}\;z \leq 12.2:\\
\;\;\;\;x \cdot x - t \cdot \left(y \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 4 Error 8.7 Cost 1096
\[\begin{array}{l}
\mathbf{if}\;z \cdot z \leq 10^{-119}:\\
\;\;\;\;x \cdot x - t \cdot \left(y \cdot -4\right)\\
\mathbf{elif}\;z \cdot z \leq 10^{+292}:\\
\;\;\;\;4 \cdot \left(y \cdot \left(t - z \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(z \cdot \left(y \cdot -4\right)\right)\\
\end{array}
\]
Alternative 5 Error 0.1 Cost 1092
\[\begin{array}{l}
\mathbf{if}\;z \cdot z \leq 10^{+292}:\\
\;\;\;\;x \cdot x - \left(y \cdot -4\right) \cdot \left(t - z \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot x + \left(z \cdot \left(z \cdot y\right)\right) \cdot -4\\
\end{array}
\]
Alternative 6 Error 26.0 Cost 976
\[\begin{array}{l}
t_1 := \left(y \cdot 4\right) \cdot t\\
t_2 := z \cdot \left(z \cdot \left(y \cdot -4\right)\right)\\
\mathbf{if}\;z \leq -0.73:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{-298}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 4.4 \cdot 10^{-284}:\\
\;\;\;\;x \cdot x\\
\mathbf{elif}\;z \leq 7.8:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
Alternative 7 Error 14.6 Cost 840
\[\begin{array}{l}
\mathbf{if}\;x \leq -1.55 \cdot 10^{+51}:\\
\;\;\;\;x \cdot x\\
\mathbf{elif}\;x \leq 460000000:\\
\;\;\;\;4 \cdot \left(y \cdot \left(t - z \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot x\\
\end{array}
\]
Alternative 8 Error 25.7 Cost 584
\[\begin{array}{l}
\mathbf{if}\;x \leq -7 \cdot 10^{+45}:\\
\;\;\;\;x \cdot x\\
\mathbf{elif}\;x \leq 53000000:\\
\;\;\;\;\left(y \cdot 4\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;x \cdot x\\
\end{array}
\]
Alternative 9 Error 41.3 Cost 192
\[x \cdot x
\]