?

Average Error: 0.0 → 0.0
Time: 6.7s
Precision: binary64
Cost: 704

?

\[\left(x \cdot y + z \cdot t\right) + a \cdot b \]
\[\left(x \cdot y + z \cdot t\right) + a \cdot b \]
(FPCore (x y z t a b) :precision binary64 (+ (+ (* x y) (* z t)) (* a b)))
(FPCore (x y z t a b) :precision binary64 (+ (+ (* x y) (* z t)) (* a b)))
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 ((x * y) + (z * t)) + (a * b);
}
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 = ((x * y) + (z * t)) + (a * b)
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 ((x * y) + (z * t)) + (a * b);
}
def code(x, y, z, t, a, b):
	return ((x * y) + (z * t)) + (a * b)
def code(x, y, z, t, a, b):
	return ((x * y) + (z * t)) + (a * b)
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(Float64(x * y) + Float64(z * t)) + Float64(a * b))
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 = ((x * y) + (z * t)) + (a * b);
end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision]
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision]
\left(x \cdot y + z \cdot t\right) + a \cdot b
\left(x \cdot y + z \cdot t\right) + a \cdot b

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Initial program 0.0

    \[\left(x \cdot y + z \cdot t\right) + a \cdot b \]
  2. Final simplification0.0

    \[\leadsto \left(x \cdot y + z \cdot t\right) + a \cdot b \]

Alternatives

Alternative 1
Error22.2
Cost2008
\[\begin{array}{l} t_1 := a \cdot b + t \cdot z\\ \mathbf{if}\;a \cdot b \leq -9.5 \cdot 10^{-90}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \cdot b \leq -2 \cdot 10^{-205}:\\ \;\;\;\;y \cdot x\\ \mathbf{elif}\;a \cdot b \leq -5.6 \cdot 10^{-230}:\\ \;\;\;\;t \cdot z\\ \mathbf{elif}\;a \cdot b \leq 7 \cdot 10^{-178}:\\ \;\;\;\;y \cdot x\\ \mathbf{elif}\;a \cdot b \leq 6.2 \cdot 10^{-145}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \cdot b \leq 4.6 \cdot 10^{-55}:\\ \;\;\;\;y \cdot x\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 2
Error29.6
Cost1232
\[\begin{array}{l} \mathbf{if}\;a \cdot b \leq -3.35 \cdot 10^{-12}:\\ \;\;\;\;a \cdot b\\ \mathbf{elif}\;a \cdot b \leq -1.1 \cdot 10^{-204}:\\ \;\;\;\;y \cdot x\\ \mathbf{elif}\;a \cdot b \leq -4.4 \cdot 10^{-229}:\\ \;\;\;\;t \cdot z\\ \mathbf{elif}\;a \cdot b \leq 3.7 \cdot 10^{+90}:\\ \;\;\;\;y \cdot x\\ \mathbf{else}:\\ \;\;\;\;a \cdot b\\ \end{array} \]
Alternative 3
Error15.0
Cost976
\[\begin{array}{l} t_1 := a \cdot b + y \cdot x\\ t_2 := a \cdot b + t \cdot z\\ \mathbf{if}\;t \leq -2.05 \cdot 10^{+29}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{+57}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 4 \cdot 10^{+155}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 2.6 \cdot 10^{+187}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 4
Error9.1
Cost968
\[\begin{array}{l} t_1 := a \cdot b + t \cdot z\\ \mathbf{if}\;a \cdot b \leq -3.45 \cdot 10^{-12}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \cdot b \leq 2.1 \cdot 10^{+54}:\\ \;\;\;\;y \cdot x + t \cdot z\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 5
Error29.9
Cost712
\[\begin{array}{l} \mathbf{if}\;a \cdot b \leq -2.95 \cdot 10^{-15}:\\ \;\;\;\;a \cdot b\\ \mathbf{elif}\;a \cdot b \leq 2.95 \cdot 10^{+37}:\\ \;\;\;\;t \cdot z\\ \mathbf{else}:\\ \;\;\;\;a \cdot b\\ \end{array} \]
Alternative 6
Error41.3
Cost192
\[a \cdot b \]

Error

Reproduce?

herbie shell --seed 2023090 
(FPCore (x y z t a b)
  :name "Linear.V3:$cdot from linear-1.19.1.3, B"
  :precision binary64
  (+ (+ (* x y) (* z t)) (* a b)))