?

Average Error: 0.0 → 0.0
Time: 13.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
Error30.1
Cost1492
\[\begin{array}{l} \mathbf{if}\;a \cdot b \leq -3.7 \cdot 10^{+16}:\\ \;\;\;\;a \cdot b\\ \mathbf{elif}\;a \cdot b \leq -1.4 \cdot 10^{-95}:\\ \;\;\;\;y \cdot x\\ \mathbf{elif}\;a \cdot b \leq -5 \cdot 10^{-139}:\\ \;\;\;\;t \cdot z\\ \mathbf{elif}\;a \cdot b \leq -3.6 \cdot 10^{-188}:\\ \;\;\;\;y \cdot x\\ \mathbf{elif}\;a \cdot b \leq 2.55 \cdot 10^{+61}:\\ \;\;\;\;t \cdot z\\ \mathbf{else}:\\ \;\;\;\;a \cdot b\\ \end{array} \]
Alternative 2
Error22.4
Cost976
\[\begin{array}{l} t_1 := a \cdot b + t \cdot z\\ \mathbf{if}\;x \leq -1.9 \cdot 10^{+260}:\\ \;\;\;\;y \cdot x\\ \mathbf{elif}\;x \leq -5.1 \cdot 10^{+119}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -1.9 \cdot 10^{+108}:\\ \;\;\;\;y \cdot x\\ \mathbf{elif}\;x \leq 1.9 \cdot 10^{-105}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\\ \end{array} \]
Alternative 3
Error15.2
Cost976
\[\begin{array}{l} t_1 := a \cdot b + y \cdot x\\ t_2 := a \cdot b + t \cdot z\\ \mathbf{if}\;t \leq -6.5 \cdot 10^{-143}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 3.7 \cdot 10^{-89}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.36 \cdot 10^{-61}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 2.08 \cdot 10^{+71}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 4
Error9.6
Cost968
\[\begin{array}{l} \mathbf{if}\;a \cdot b \leq -47000:\\ \;\;\;\;a \cdot b + y \cdot x\\ \mathbf{elif}\;a \cdot b \leq 10^{+67}:\\ \;\;\;\;y \cdot x + t \cdot z\\ \mathbf{else}:\\ \;\;\;\;a \cdot b + t \cdot z\\ \end{array} \]
Alternative 5
Error30.5
Cost712
\[\begin{array}{l} \mathbf{if}\;a \cdot b \leq -5.4 \cdot 10^{+14}:\\ \;\;\;\;a \cdot b\\ \mathbf{elif}\;a \cdot b \leq 1.6 \cdot 10^{+64}:\\ \;\;\;\;t \cdot z\\ \mathbf{else}:\\ \;\;\;\;a \cdot b\\ \end{array} \]
Alternative 6
Error42.2
Cost192
\[a \cdot b \]

Error

Reproduce?

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