?

Average Error: 0.0 → 0.0
Time: 15.3s
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
Error31.0
Cost2012
\[\begin{array}{l} \mathbf{if}\;a \cdot b \leq -2.35 \cdot 10^{-7}:\\ \;\;\;\;a \cdot b\\ \mathbf{elif}\;a \cdot b \leq -1.85 \cdot 10^{-162}:\\ \;\;\;\;y \cdot x\\ \mathbf{elif}\;a \cdot b \leq 2.32 \cdot 10^{-240}:\\ \;\;\;\;t \cdot z\\ \mathbf{elif}\;a \cdot b \leq 1.05 \cdot 10^{-180}:\\ \;\;\;\;y \cdot x\\ \mathbf{elif}\;a \cdot b \leq 2.5 \cdot 10^{-102}:\\ \;\;\;\;t \cdot z\\ \mathbf{elif}\;a \cdot b \leq 2.3 \cdot 10^{-54}:\\ \;\;\;\;a \cdot b\\ \mathbf{elif}\;a \cdot b \leq 800000:\\ \;\;\;\;t \cdot z\\ \mathbf{else}:\\ \;\;\;\;a \cdot b\\ \end{array} \]
Alternative 2
Error14.5
Cost1240
\[\begin{array}{l} t_1 := a \cdot b + y \cdot x\\ t_2 := a \cdot b + t \cdot z\\ \mathbf{if}\;t \leq -1.15 \cdot 10^{-117}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 1.7 \cdot 10^{-83}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 4.1 \cdot 10^{-47}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 4.8 \cdot 10^{-9}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 6.2 \cdot 10^{+94}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 9 \cdot 10^{+111}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 3
Error31.2
Cost1232
\[\begin{array}{l} \mathbf{if}\;a \cdot b \leq -1.05 \cdot 10^{-79}:\\ \;\;\;\;a \cdot b\\ \mathbf{elif}\;a \cdot b \leq 2.5 \cdot 10^{-102}:\\ \;\;\;\;t \cdot z\\ \mathbf{elif}\;a \cdot b \leq 1.3 \cdot 10^{-54}:\\ \;\;\;\;a \cdot b\\ \mathbf{elif}\;a \cdot b \leq 14500:\\ \;\;\;\;t \cdot z\\ \mathbf{else}:\\ \;\;\;\;a \cdot b\\ \end{array} \]
Alternative 4
Error21.1
Cost1108
\[\begin{array}{l} t_1 := a \cdot b + t \cdot z\\ \mathbf{if}\;x \leq -2 \cdot 10^{+252}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -8 \cdot 10^{+176}:\\ \;\;\;\;y \cdot x\\ \mathbf{elif}\;x \leq -1.8 \cdot 10^{+169}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -4.3 \cdot 10^{+104}:\\ \;\;\;\;y \cdot x\\ \mathbf{elif}\;x \leq 5.2 \cdot 10^{-21}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\\ \end{array} \]
Alternative 5
Error10.3
Cost968
\[\begin{array}{l} \mathbf{if}\;a \cdot b \leq -2.2 \cdot 10^{-78}:\\ \;\;\;\;a \cdot b + y \cdot x\\ \mathbf{elif}\;a \cdot b \leq 8.6 \cdot 10^{-94}:\\ \;\;\;\;y \cdot x + t \cdot z\\ \mathbf{else}:\\ \;\;\;\;a \cdot b + t \cdot z\\ \end{array} \]
Alternative 6
Error41.8
Cost192
\[a \cdot b \]

Error

Reproduce?

herbie shell --seed 2023075 
(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)))