\[\left(x \cdot y + z \cdot t\right) + a \cdot b
\]
↓
\[a \cdot b + \left(z \cdot t + x \cdot y\right)
\]
(FPCore (x y z t a b) :precision binary64 (+ (+ (* x y) (* z t)) (* a b)))
↓
(FPCore (x y z t a b) :precision binary64 (+ (* a b) (+ (* z t) (* x y))))
double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * t)) + (a * b);
}
↓
double code(double x, double y, double z, double t, double a, double b) {
return (a * b) + ((z * t) + (x * y));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x * y) + (z * t)) + (a * b)
end function
↓
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (a * b) + ((z * t) + (x * y))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * t)) + (a * b);
}
↓
public static double code(double x, double y, double z, double t, double a, double b) {
return (a * b) + ((z * t) + (x * y));
}
def code(x, y, z, t, a, b):
return ((x * y) + (z * t)) + (a * b)
↓
def code(x, y, z, t, a, b):
return (a * b) + ((z * t) + (x * y))
function code(x, y, z, t, a, b)
return Float64(Float64(Float64(x * y) + Float64(z * t)) + Float64(a * b))
end
↓
function code(x, y, z, t, a, b)
return Float64(Float64(a * b) + Float64(Float64(z * t) + Float64(x * y)))
end
function tmp = code(x, y, z, t, a, b)
tmp = ((x * y) + (z * t)) + (a * b);
end
↓
function tmp = code(x, y, z, t, a, b)
tmp = (a * b) + ((z * t) + (x * y));
end
\[\begin{array}{l}
\mathbf{if}\;a \cdot b \leq -2.9761330102945274 \cdot 10^{+36}:\\
\;\;\;\;a \cdot b\\
\mathbf{elif}\;a \cdot b \leq 2.0936144743594102 \cdot 10^{-16}:\\
\;\;\;\;z \cdot t + x \cdot y\\
\mathbf{else}:\\
\;\;\;\;a \cdot b\\
\end{array}
\]
Alternative 3
Error
9.2
Cost
968
\[\begin{array}{l}
t_1 := a \cdot b + z \cdot t\\
\mathbf{if}\;a \cdot b \leq -3.7245213771211815 \cdot 10^{+22}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \cdot b \leq 2.0936144743594102 \cdot 10^{-16}:\\
\;\;\;\;z \cdot t + x \cdot y\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 4
Error
9.6
Cost
968
\[\begin{array}{l}
\mathbf{if}\;a \cdot b \leq -3.7245213771211815 \cdot 10^{+22}:\\
\;\;\;\;a \cdot b + z \cdot t\\
\mathbf{elif}\;a \cdot b \leq 6.325764281842692 \cdot 10^{-20}:\\
\;\;\;\;z \cdot t + x \cdot y\\
\mathbf{else}:\\
\;\;\;\;a \cdot b + x \cdot y\\
\end{array}
\]