?

Average Error: 0.0 → 0.0
Time: 26.8s
Precision: binary64
Cost: 960

?

\[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
\[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
(FPCore (x y z t a b c i)
 :precision binary64
 (+ (+ (+ (* x y) (* z t)) (* a b)) (* c i)))
(FPCore (x y z t a b c i)
 :precision binary64
 (+ (+ (+ (* x y) (* z t)) (* a b)) (* c i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return (((x * y) + (z * t)) + (a * b)) + (c * i);
}
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return (((x * y) + (z * t)) + (a * b)) + (c * i);
}
real(8) function code(x, y, z, t, a, b, c, i)
    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
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    code = (((x * y) + (z * t)) + (a * b)) + (c * i)
end function
real(8) function code(x, y, z, t, a, b, c, i)
    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
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    code = (((x * y) + (z * t)) + (a * b)) + (c * i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return (((x * y) + (z * t)) + (a * b)) + (c * i);
}
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return (((x * y) + (z * t)) + (a * b)) + (c * i);
}
def code(x, y, z, t, a, b, c, i):
	return (((x * y) + (z * t)) + (a * b)) + (c * i)
def code(x, y, z, t, a, b, c, i):
	return (((x * y) + (z * t)) + (a * b)) + (c * i)
function code(x, y, z, t, a, b, c, i)
	return Float64(Float64(Float64(Float64(x * y) + Float64(z * t)) + Float64(a * b)) + Float64(c * i))
end
function code(x, y, z, t, a, b, c, i)
	return Float64(Float64(Float64(Float64(x * y) + Float64(z * t)) + Float64(a * b)) + Float64(c * i))
end
function tmp = code(x, y, z, t, a, b, c, i)
	tmp = (((x * y) + (z * t)) + (a * b)) + (c * i);
end
function tmp = code(x, y, z, t, a, b, c, i)
	tmp = (((x * y) + (z * t)) + (a * b)) + (c * i);
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]
\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i
\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Initial program 0.0

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

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

Alternatives

Alternative 1
Error37.7
Cost2272
\[\begin{array}{l} \mathbf{if}\;a \cdot b \leq -2.8 \cdot 10^{+80}:\\ \;\;\;\;a \cdot b\\ \mathbf{elif}\;a \cdot b \leq -1.65 \cdot 10^{-22}:\\ \;\;\;\;c \cdot i\\ \mathbf{elif}\;a \cdot b \leq -1.15 \cdot 10^{-23}:\\ \;\;\;\;a \cdot b\\ \mathbf{elif}\;a \cdot b \leq -1.9 \cdot 10^{-221}:\\ \;\;\;\;t \cdot z\\ \mathbf{elif}\;a \cdot b \leq -1 \cdot 10^{-318}:\\ \;\;\;\;c \cdot i\\ \mathbf{elif}\;a \cdot b \leq 8.5 \cdot 10^{-50}:\\ \;\;\;\;t \cdot z\\ \mathbf{elif}\;a \cdot b \leq 1.8 \cdot 10^{-18}:\\ \;\;\;\;c \cdot i\\ \mathbf{elif}\;a \cdot b \leq 3.4 \cdot 10^{+65}:\\ \;\;\;\;t \cdot z\\ \mathbf{else}:\\ \;\;\;\;a \cdot b\\ \end{array} \]
Alternative 2
Error22.4
Cost2268
\[\begin{array}{l} t_1 := c \cdot i + y \cdot x\\ t_2 := t \cdot z + a \cdot b\\ t_3 := t \cdot z + c \cdot i\\ \mathbf{if}\;a \cdot b \leq -4.05 \cdot 10^{+74}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \cdot b \leq -8 \cdot 10^{-115}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \cdot b \leq -4.1 \cdot 10^{-221}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \cdot b \leq -1 \cdot 10^{-318}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \cdot b \leq 0.00086:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \cdot b \leq 4.9 \cdot 10^{+70}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \cdot b \leq 2.75 \cdot 10^{+76}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;c \cdot i + a \cdot b\\ \end{array} \]
Alternative 3
Error28.0
Cost2032
\[\begin{array}{l} t_1 := t \cdot z + a \cdot b\\ t_2 := c \cdot i + a \cdot b\\ t_3 := t \cdot z + c \cdot i\\ t_4 := y \cdot x + a \cdot b\\ \mathbf{if}\;t \leq -1 \cdot 10^{-45}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq -2.1 \cdot 10^{-274}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 1.9 \cdot 10^{-238}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;t \leq 1.2 \cdot 10^{-150}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 9.8 \cdot 10^{-60}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;t \leq 6.2 \cdot 10^{-51}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq 2.7 \cdot 10^{-37}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;t \leq 86000000000000:\\ \;\;\;\;c \cdot i + y \cdot x\\ \mathbf{elif}\;t \leq 3.6 \cdot 10^{+28}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.1 \cdot 10^{+138}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;t \leq 2.9 \cdot 10^{+205}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.56 \cdot 10^{+237}:\\ \;\;\;\;t_4\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 4
Error37.8
Cost2012
\[\begin{array}{l} \mathbf{if}\;a \cdot b \leq -9 \cdot 10^{+79}:\\ \;\;\;\;a \cdot b\\ \mathbf{elif}\;a \cdot b \leq -2.9 \cdot 10^{-62}:\\ \;\;\;\;y \cdot x\\ \mathbf{elif}\;a \cdot b \leq -3.4 \cdot 10^{-221}:\\ \;\;\;\;t \cdot z\\ \mathbf{elif}\;a \cdot b \leq -1 \cdot 10^{-318}:\\ \;\;\;\;c \cdot i\\ \mathbf{elif}\;a \cdot b \leq 7.6 \cdot 10^{-52}:\\ \;\;\;\;t \cdot z\\ \mathbf{elif}\;a \cdot b \leq 6.5 \cdot 10^{-20}:\\ \;\;\;\;c \cdot i\\ \mathbf{elif}\;a \cdot b \leq 2.2 \cdot 10^{+66}:\\ \;\;\;\;t \cdot z\\ \mathbf{else}:\\ \;\;\;\;a \cdot b\\ \end{array} \]
Alternative 5
Error34.2
Cost2008
\[\begin{array}{l} t_1 := c \cdot i + a \cdot b\\ \mathbf{if}\;a \cdot b \leq -4.8 \cdot 10^{+75}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \cdot b \leq -7.5 \cdot 10^{-67}:\\ \;\;\;\;y \cdot x\\ \mathbf{elif}\;a \cdot b \leq -1 \cdot 10^{-102}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \cdot b \leq -8 \cdot 10^{-221}:\\ \;\;\;\;t \cdot z\\ \mathbf{elif}\;a \cdot b \leq -1 \cdot 10^{-318}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \cdot b \leq 4 \cdot 10^{-53}:\\ \;\;\;\;t \cdot z\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 6
Error23.8
Cost2008
\[\begin{array}{l} t_1 := t \cdot z + a \cdot b\\ t_2 := c \cdot i + y \cdot x\\ \mathbf{if}\;c \cdot i \leq -2.8 \cdot 10^{-12}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;c \cdot i \leq -2.3 \cdot 10^{-111}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \cdot i \leq -1.2 \cdot 10^{-170}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;c \cdot i \leq 1.65 \cdot 10^{-47}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \cdot i \leq 8.5 \cdot 10^{+49}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;c \cdot i \leq 4.5 \cdot 10^{+68}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;c \cdot i + a \cdot b\\ \end{array} \]
Alternative 7
Error6.6
Cost2004
\[\begin{array}{l} t_1 := y \cdot x + \left(a \cdot b + t \cdot z\right)\\ \mathbf{if}\;a \cdot b \leq -2.8 \cdot 10^{+80}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \cdot b \leq 22:\\ \;\;\;\;y \cdot x + \left(c \cdot i + t \cdot z\right)\\ \mathbf{elif}\;a \cdot b \leq 5.2 \cdot 10^{+70}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \cdot b \leq 1.8 \cdot 10^{+78}:\\ \;\;\;\;c \cdot i + y \cdot x\\ \mathbf{elif}\;a \cdot b \leq 7.9 \cdot 10^{+117}:\\ \;\;\;\;c \cdot i + a \cdot b\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 8
Error27.4
Cost1900
\[\begin{array}{l} t_1 := t \cdot z + a \cdot b\\ t_2 := c \cdot i + a \cdot b\\ t_3 := y \cdot x + t \cdot z\\ t_4 := y \cdot x + a \cdot b\\ \mathbf{if}\;t \leq -2.4 \cdot 10^{-59}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq -1.9 \cdot 10^{-276}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 1.2 \cdot 10^{-239}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;t \leq 2.6 \cdot 10^{-151}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 1.6 \cdot 10^{-59}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;t \leq 5.3 \cdot 10^{-51}:\\ \;\;\;\;t \cdot z + c \cdot i\\ \mathbf{elif}\;t \leq 1.5 \cdot 10^{-36}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;t \leq 19500000000000:\\ \;\;\;\;c \cdot i + y \cdot x\\ \mathbf{elif}\;t \leq 1.58 \cdot 10^{+28}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.9 \cdot 10^{+130}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;t \leq 4.8 \cdot 10^{+237}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 9
Error23.1
Cost1488
\[\begin{array}{l} t_1 := c \cdot i + y \cdot x\\ t_2 := c \cdot i + a \cdot b\\ \mathbf{if}\;a \cdot b \leq -7.2 \cdot 10^{+75}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \cdot b \leq 1.12 \cdot 10^{-218}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \cdot b \leq 6.2 \cdot 10^{-140}:\\ \;\;\;\;t \cdot z\\ \mathbf{elif}\;a \cdot b \leq 1.7 \cdot 10^{-28}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 10
Error9.0
Cost1224
\[\begin{array}{l} \mathbf{if}\;c \cdot i \leq -3.8 \cdot 10^{+126}:\\ \;\;\;\;t \cdot z + c \cdot i\\ \mathbf{elif}\;c \cdot i \leq 7.6 \cdot 10^{+68}:\\ \;\;\;\;y \cdot x + \left(a \cdot b + t \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;c \cdot i + a \cdot b\\ \end{array} \]
Alternative 11
Error6.5
Cost1224
\[\begin{array}{l} \mathbf{if}\;c \cdot i \leq -2.5 \cdot 10^{-14}:\\ \;\;\;\;y \cdot x + \left(c \cdot i + t \cdot z\right)\\ \mathbf{elif}\;c \cdot i \leq 14200:\\ \;\;\;\;y \cdot x + \left(a \cdot b + t \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;\left(t \cdot z + a \cdot b\right) + c \cdot i\\ \end{array} \]
Alternative 12
Error39.1
Cost712
\[\begin{array}{l} \mathbf{if}\;c \cdot i \leq -8.6 \cdot 10^{-21}:\\ \;\;\;\;c \cdot i\\ \mathbf{elif}\;c \cdot i \leq 4.8 \cdot 10^{+127}:\\ \;\;\;\;a \cdot b\\ \mathbf{else}:\\ \;\;\;\;c \cdot i\\ \end{array} \]
Alternative 13
Error47.0
Cost192
\[a \cdot b \]

Error

Reproduce?

herbie shell --seed 2023074 
(FPCore (x y z t a b c i)
  :name "Linear.V4:$cdot from linear-1.19.1.3, C"
  :precision binary64
  (+ (+ (+ (* x y) (* z t)) (* a b)) (* c i)))