?

Average Error: 0.0 → 0.0
Time: 24.4s
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
Error18.6
Cost2024
\[\begin{array}{l} t_1 := y \cdot x + a \cdot b\\ t_2 := \left(a \cdot b + t \cdot z\right) + c \cdot i\\ \mathbf{if}\;i \leq -2.1 \cdot 10^{-44}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;i \leq -2.2 \cdot 10^{-161}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;i \leq -7.8 \cdot 10^{-199}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;i \leq 4.3 \cdot 10^{-273}:\\ \;\;\;\;y \cdot x + t \cdot z\\ \mathbf{elif}\;i \leq 2.6 \cdot 10^{-155}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;i \leq 7 \cdot 10^{-135}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;i \leq 6.3 \cdot 10^{-105}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;i \leq 1.1 \cdot 10^{-62}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;i \leq 1.4 \cdot 10^{+103}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;i \leq 2.05 \cdot 10^{+126}:\\ \;\;\;\;c \cdot i + y \cdot x\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 2
Error22.0
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 -7.5 \cdot 10^{+81}:\\ \;\;\;\;c \cdot i + t \cdot z\\ \mathbf{elif}\;c \cdot i \leq -1.25 \cdot 10^{-99}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \cdot i \leq -1 \cdot 10^{-136}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;c \cdot i \leq 6.4 \cdot 10^{-96}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \cdot i \leq 7500000000000:\\ \;\;\;\;y \cdot x + a \cdot b\\ \mathbf{elif}\;c \cdot i \leq 2.9 \cdot 10^{+85}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 3
Error26.5
Cost1900
\[\begin{array}{l} t_1 := t \cdot z + a \cdot b\\ t_2 := y \cdot x + a \cdot b\\ t_3 := c \cdot i + t \cdot z\\ t_4 := y \cdot x + t \cdot z\\ \mathbf{if}\;i \leq -1.65 \cdot 10^{-41}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;i \leq -4.4 \cdot 10^{-117}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;i \leq 4 \cdot 10^{-274}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;i \leq 1.4 \cdot 10^{-214}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;i \leq 2.9 \cdot 10^{-133}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;i \leq 9 \cdot 10^{-105}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;i \leq 10^{-33}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;i \leq 45000000000:\\ \;\;\;\;t_4\\ \mathbf{elif}\;i \leq 1.3 \cdot 10^{+127}:\\ \;\;\;\;c \cdot i + y \cdot x\\ \mathbf{elif}\;i \leq 9 \cdot 10^{+269}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;i \leq 2.05 \cdot 10^{+290}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 4
Error27.0
Cost1504
\[\begin{array}{l} t_1 := c \cdot i + y \cdot x\\ t_2 := c \cdot i + t \cdot z\\ t_3 := c \cdot i + a \cdot b\\ \mathbf{if}\;t \leq -3 \cdot 10^{-95}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 2.8 \cdot 10^{-300}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.9 \cdot 10^{-253}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq 4.6 \cdot 10^{-192}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 7 \cdot 10^{-95}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq 1.6 \cdot 10^{-60}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.7 \cdot 10^{-14}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq 4.5 \cdot 10^{+79}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 5
Error27.1
Cost1504
\[\begin{array}{l} t_1 := c \cdot i + y \cdot x\\ t_2 := c \cdot i + a \cdot b\\ \mathbf{if}\;t \leq -5 \cdot 10^{-98}:\\ \;\;\;\;c \cdot i + t \cdot z\\ \mathbf{elif}\;t \leq 2.5 \cdot 10^{-307}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 4.6 \cdot 10^{-253}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 9 \cdot 10^{-192}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 5.6 \cdot 10^{-97}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{-60}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 5.1 \cdot 10^{-15}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 1.5 \cdot 10^{+80}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t \cdot z + a \cdot b\\ \end{array} \]
Alternative 6
Error37.3
Cost1492
\[\begin{array}{l} \mathbf{if}\;c \cdot i \leq -5.8 \cdot 10^{+81}:\\ \;\;\;\;c \cdot i\\ \mathbf{elif}\;c \cdot i \leq -1.5 \cdot 10^{-77}:\\ \;\;\;\;a \cdot b\\ \mathbf{elif}\;c \cdot i \leq 9.5 \cdot 10^{-251}:\\ \;\;\;\;t \cdot z\\ \mathbf{elif}\;c \cdot i \leq 180000000:\\ \;\;\;\;a \cdot b\\ \mathbf{elif}\;c \cdot i \leq 5 \cdot 10^{+87}:\\ \;\;\;\;t \cdot z\\ \mathbf{else}:\\ \;\;\;\;c \cdot i\\ \end{array} \]
Alternative 7
Error22.1
Cost1488
\[\begin{array}{l} t_1 := c \cdot i + t \cdot z\\ t_2 := c \cdot i + a \cdot b\\ \mathbf{if}\;a \cdot b \leq -2.8 \cdot 10^{+25}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \cdot b \leq 1.7 \cdot 10^{-193}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \cdot b \leq 3.1 \cdot 10^{-168}:\\ \;\;\;\;y \cdot x\\ \mathbf{elif}\;a \cdot b \leq 3.8 \cdot 10^{+24}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 8
Error42.4
Cost1248
\[\begin{array}{l} \mathbf{if}\;t \leq -1.6 \cdot 10^{-92}:\\ \;\;\;\;t \cdot z\\ \mathbf{elif}\;t \leq 8.8 \cdot 10^{-305}:\\ \;\;\;\;y \cdot x\\ \mathbf{elif}\;t \leq 4.6 \cdot 10^{-253}:\\ \;\;\;\;a \cdot b\\ \mathbf{elif}\;t \leq 3.7 \cdot 10^{-183}:\\ \;\;\;\;y \cdot x\\ \mathbf{elif}\;t \leq 1.15 \cdot 10^{-157}:\\ \;\;\;\;c \cdot i\\ \mathbf{elif}\;t \leq 4.8 \cdot 10^{-100}:\\ \;\;\;\;a \cdot b\\ \mathbf{elif}\;t \leq 5 \cdot 10^{+31}:\\ \;\;\;\;c \cdot i\\ \mathbf{elif}\;t \leq 1.16 \cdot 10^{+80}:\\ \;\;\;\;y \cdot x\\ \mathbf{else}:\\ \;\;\;\;t \cdot z\\ \end{array} \]
Alternative 9
Error5.7
Cost1224
\[\begin{array}{l} \mathbf{if}\;a \cdot b \leq -4.2 \cdot 10^{+46}:\\ \;\;\;\;\left(a \cdot b + t \cdot z\right) + c \cdot i\\ \mathbf{elif}\;a \cdot b \leq 2.1 \cdot 10^{+21}:\\ \;\;\;\;\left(y \cdot x + t \cdot z\right) + c \cdot i\\ \mathbf{else}:\\ \;\;\;\;\left(a \cdot b + y \cdot x\right) + c \cdot i\\ \end{array} \]
Alternative 10
Error10.8
Cost968
\[\begin{array}{l} t_1 := \left(a \cdot b + t \cdot z\right) + c \cdot i\\ \mathbf{if}\;t \leq -1.5 \cdot 10^{-93}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 4.6 \cdot 10^{+79}:\\ \;\;\;\;\left(a \cdot b + y \cdot x\right) + c \cdot i\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 11
Error37.1
Cost844
\[\begin{array}{l} t_1 := c \cdot i + a \cdot b\\ \mathbf{if}\;t \leq -72000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -4.2 \cdot 10^{-303}:\\ \;\;\;\;y \cdot x\\ \mathbf{elif}\;t \leq 9.5 \cdot 10^{+31}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 3 \cdot 10^{+80}:\\ \;\;\;\;y \cdot x\\ \mathbf{else}:\\ \;\;\;\;t \cdot z\\ \end{array} \]
Alternative 12
Error37.4
Cost712
\[\begin{array}{l} \mathbf{if}\;c \cdot i \leq -1.9 \cdot 10^{+82}:\\ \;\;\;\;c \cdot i\\ \mathbf{elif}\;c \cdot i \leq 1.4 \cdot 10^{+85}:\\ \;\;\;\;a \cdot b\\ \mathbf{else}:\\ \;\;\;\;c \cdot i\\ \end{array} \]
Alternative 13
Error47.0
Cost192
\[a \cdot b \]

Error

Reproduce?

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