?

Average Error: 0.0 → 0.0
Time: 19.3s
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.6
Cost2012
\[\begin{array}{l} \mathbf{if}\;c \cdot i \leq -2.65 \cdot 10^{+14}:\\ \;\;\;\;c \cdot i\\ \mathbf{elif}\;c \cdot i \leq -4.7 \cdot 10^{-150}:\\ \;\;\;\;t \cdot z\\ \mathbf{elif}\;c \cdot i \leq 2.7 \cdot 10^{-100}:\\ \;\;\;\;a \cdot b\\ \mathbf{elif}\;c \cdot i \leq 1.52 \cdot 10^{-72}:\\ \;\;\;\;y \cdot x\\ \mathbf{elif}\;c \cdot i \leq 4.3 \cdot 10^{-41}:\\ \;\;\;\;t \cdot z\\ \mathbf{elif}\;c \cdot i \leq 1.25 \cdot 10^{-13}:\\ \;\;\;\;y \cdot x\\ \mathbf{elif}\;c \cdot i \leq 6 \cdot 10^{+61}:\\ \;\;\;\;t \cdot z\\ \mathbf{else}:\\ \;\;\;\;c \cdot i\\ \end{array} \]
Alternative 2
Error27.0
Cost1768
\[\begin{array}{l} t_1 := c \cdot i + a \cdot b\\ t_2 := t \cdot z + a \cdot b\\ t_3 := c \cdot i + y \cdot x\\ t_4 := t \cdot z + c \cdot i\\ \mathbf{if}\;x \leq -1.9 \cdot 10^{+132}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x \leq -7.2 \cdot 10^{+77}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -0.21:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x \leq -6.5 \cdot 10^{-57}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -8.5 \cdot 10^{-111}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -1.15 \cdot 10^{-159}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -2.9 \cdot 10^{-264}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;x \leq 2.6 \cdot 10^{-265}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 1.95 \cdot 10^{-219}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;x \leq 1.8 \cdot 10^{-67}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 3
Error27.2
Cost1768
\[\begin{array}{l} t_1 := t \cdot z + a \cdot b\\ t_2 := c \cdot i + y \cdot x\\ t_3 := t \cdot z + c \cdot i\\ \mathbf{if}\;z \leq -1.15 \cdot 10^{+256}:\\ \;\;\;\;y \cdot x + t \cdot z\\ \mathbf{elif}\;z \leq -2.25 \cdot 10^{+104}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -6.2 \cdot 10^{+45}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq -1.7 \cdot 10^{-10}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -2.5 \cdot 10^{-38}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -3.8 \cdot 10^{-51}:\\ \;\;\;\;y \cdot x + a \cdot b\\ \mathbf{elif}\;z \leq -2 \cdot 10^{-60}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq -1.4 \cdot 10^{-199}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{-293}:\\ \;\;\;\;c \cdot i + a \cdot b\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{-200}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 4
Error27.3
Cost1636
\[\begin{array}{l} t_1 := t \cdot z + c \cdot i\\ t_2 := t \cdot z + a \cdot b\\ t_3 := c \cdot i + y \cdot x\\ \mathbf{if}\;z \leq -1.45 \cdot 10^{+106}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -7.2 \cdot 10^{+45}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1.02 \cdot 10^{-10}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -1.1 \cdot 10^{-38}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq -5.3 \cdot 10^{-50}:\\ \;\;\;\;y \cdot x + a \cdot b\\ \mathbf{elif}\;z \leq -5.9 \cdot 10^{-61}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -6.4 \cdot 10^{-198}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq 8 \cdot 10^{-294}:\\ \;\;\;\;c \cdot i + a \cdot b\\ \mathbf{elif}\;z \leq 2.45 \cdot 10^{-207}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 5
Error32.6
Cost1504
\[\begin{array}{l} t_1 := c \cdot i + a \cdot b\\ \mathbf{if}\;y \leq -7.5 \cdot 10^{-57}:\\ \;\;\;\;y \cdot x\\ \mathbf{elif}\;y \leq 9.2 \cdot 10^{-41}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 4.8 \cdot 10^{-17}:\\ \;\;\;\;t \cdot z\\ \mathbf{elif}\;y \leq 9.5 \cdot 10^{+56}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 4.3 \cdot 10^{+80}:\\ \;\;\;\;t \cdot z\\ \mathbf{elif}\;y \leq 1.35 \cdot 10^{+102}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 3.7 \cdot 10^{+255}:\\ \;\;\;\;y \cdot x\\ \mathbf{elif}\;y \leq 3.15 \cdot 10^{+283}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\\ \end{array} \]
Alternative 6
Error30.7
Cost1240
\[\begin{array}{l} t_1 := c \cdot i + a \cdot b\\ t_2 := c \cdot i + y \cdot x\\ \mathbf{if}\;z \leq -2 \cdot 10^{+177}:\\ \;\;\;\;t \cdot z\\ \mathbf{elif}\;z \leq -4.2 \cdot 10^{-11}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -2.8 \cdot 10^{-198}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 1.16 \cdot 10^{-293}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 7.2 \cdot 10^{-212}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{+49}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t \cdot z\\ \end{array} \]
Alternative 7
Error27.7
Cost1240
\[\begin{array}{l} t_1 := c \cdot i + a \cdot b\\ t_2 := t \cdot z + a \cdot b\\ t_3 := c \cdot i + y \cdot x\\ \mathbf{if}\;z \leq -6 \cdot 10^{+99}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -3.1 \cdot 10^{+57}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -3.5 \cdot 10^{-10}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -4.4 \cdot 10^{-199}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq 9.2 \cdot 10^{-294}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{-203}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 8
Error37.8
Cost1232
\[\begin{array}{l} \mathbf{if}\;c \cdot i \leq -2.65 \cdot 10^{+14}:\\ \;\;\;\;c \cdot i\\ \mathbf{elif}\;c \cdot i \leq -3.2 \cdot 10^{-150}:\\ \;\;\;\;t \cdot z\\ \mathbf{elif}\;c \cdot i \leq 4.8 \cdot 10^{-110}:\\ \;\;\;\;a \cdot b\\ \mathbf{elif}\;c \cdot i \leq 2.12 \cdot 10^{+61}:\\ \;\;\;\;t \cdot z\\ \mathbf{else}:\\ \;\;\;\;c \cdot i\\ \end{array} \]
Alternative 9
Error9.5
Cost1224
\[\begin{array}{l} \mathbf{if}\;c \cdot i \leq -6.2 \cdot 10^{+15}:\\ \;\;\;\;c \cdot i + a \cdot b\\ \mathbf{elif}\;c \cdot i \leq 7.5 \cdot 10^{+61}:\\ \;\;\;\;a \cdot b + \left(y \cdot x + t \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot z + c \cdot i\\ \end{array} \]
Alternative 10
Error6.4
Cost1224
\[\begin{array}{l} t_1 := y \cdot x + t \cdot z\\ t_2 := c \cdot i + t_1\\ \mathbf{if}\;c \cdot i \leq -2100000000:\\ \;\;\;\;t_2\\ \mathbf{elif}\;c \cdot i \leq 4.5 \cdot 10^{-32}:\\ \;\;\;\;a \cdot b + t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 11
Error6.7
Cost1224
\[\begin{array}{l} t_1 := y \cdot x + t \cdot z\\ \mathbf{if}\;c \cdot i \leq -5.5 \cdot 10^{+14}:\\ \;\;\;\;\left(a \cdot b + y \cdot x\right) + c \cdot i\\ \mathbf{elif}\;c \cdot i \leq 1.05 \cdot 10^{-31}:\\ \;\;\;\;a \cdot b + t_1\\ \mathbf{else}:\\ \;\;\;\;c \cdot i + t_1\\ \end{array} \]
Alternative 12
Error37.9
Cost712
\[\begin{array}{l} \mathbf{if}\;c \cdot i \leq -5600000000000:\\ \;\;\;\;c \cdot i\\ \mathbf{elif}\;c \cdot i \leq 5.8 \cdot 10^{-41}:\\ \;\;\;\;a \cdot b\\ \mathbf{else}:\\ \;\;\;\;c \cdot i\\ \end{array} \]
Alternative 13
Error47.1
Cost192
\[a \cdot b \]

Error

Reproduce?

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