?

Average Error: 0.0 → 0.0
Time: 29.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
Error27.1
Cost2560
\[\begin{array}{l} t_1 := y \cdot x + t \cdot z\\ t_2 := t \cdot z + c \cdot i\\ t_3 := a \cdot b + c \cdot i\\ t_4 := t \cdot z + a \cdot b\\ t_5 := y \cdot x + c \cdot i\\ t_6 := y \cdot x + a \cdot b\\ \mathbf{if}\;c \leq -3.15 \cdot 10^{+182}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;c \leq -3.2 \cdot 10^{+109}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;c \leq -8.8 \cdot 10^{+81}:\\ \;\;\;\;t_6\\ \mathbf{elif}\;c \leq -2 \cdot 10^{+73}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;c \leq -4.3 \cdot 10^{+24}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;c \leq -5.6 \cdot 10^{-8}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;c \leq -1.8 \cdot 10^{-22}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;c \leq -3.4 \cdot 10^{-31}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq -1.85 \cdot 10^{-34}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;c \leq -3.6 \cdot 10^{-47}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;c \leq -5.2 \cdot 10^{-67}:\\ \;\;\;\;t_6\\ \mathbf{elif}\;c \leq -4.9 \cdot 10^{-89}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq -1.1 \cdot 10^{-146}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;c \leq -9.5 \cdot 10^{-169}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;c \leq 1.5 \cdot 10^{-303}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq 6.9 \cdot 10^{-103}:\\ \;\;\;\;t_4\\ \mathbf{else}:\\ \;\;\;\;t_5\\ \end{array} \]
Alternative 2
Error22.4
Cost2268
\[\begin{array}{l} t_1 := t \cdot z + a \cdot b\\ t_2 := y \cdot x + a \cdot b\\ \mathbf{if}\;c \cdot i \leq -3.5 \cdot 10^{+39}:\\ \;\;\;\;y \cdot x + c \cdot i\\ \mathbf{elif}\;c \cdot i \leq -3.4 \cdot 10^{-34}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \cdot i \leq -2.4 \cdot 10^{-170}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;c \cdot i \leq -3 \cdot 10^{-196}:\\ \;\;\;\;t \cdot z\\ \mathbf{elif}\;c \cdot i \leq -1.8 \cdot 10^{-255}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;c \cdot i \leq 5 \cdot 10^{-324}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \cdot i \leq 0.052:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t \cdot z + c \cdot i\\ \end{array} \]
Alternative 3
Error26.3
Cost2032
\[\begin{array}{l} t_1 := y \cdot x + a \cdot b\\ t_2 := t \cdot z + c \cdot i\\ t_3 := t \cdot z + a \cdot b\\ \mathbf{if}\;i \leq -2.8 \cdot 10^{-82}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;i \leq -8.5 \cdot 10^{-101}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;i \leq -2.15 \cdot 10^{-222}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;i \leq 2.2 \cdot 10^{-306}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;i \leq 1.3 \cdot 10^{-254}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;i \leq 4.5 \cdot 10^{-157}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;i \leq 7.5 \cdot 10^{-102}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;i \leq 255000000000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;i \leq 7 \cdot 10^{+34}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;i \leq 2.15 \cdot 10^{+66}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;i \leq 2.55 \cdot 10^{+119}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;i \leq 3.4 \cdot 10^{+148}:\\ \;\;\;\;a \cdot b + c \cdot i\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 4
Error24.3
Cost2008
\[\begin{array}{l} t_1 := t \cdot z + a \cdot b\\ t_2 := a \cdot b + c \cdot i\\ \mathbf{if}\;c \cdot i \leq -3.3 \cdot 10^{+41}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;c \cdot i \leq -2.2 \cdot 10^{-43}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \cdot i \leq -1.6 \cdot 10^{-166}:\\ \;\;\;\;y \cdot x\\ \mathbf{elif}\;c \cdot i \leq 29:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \cdot i \leq 4.5 \cdot 10^{+36}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;c \cdot i \leq 5.5 \cdot 10^{+54}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 5
Error43.0
Cost1776
\[\begin{array}{l} \mathbf{if}\;a \leq -5 \cdot 10^{+192}:\\ \;\;\;\;a \cdot b\\ \mathbf{elif}\;a \leq -4.6 \cdot 10^{+171}:\\ \;\;\;\;c \cdot i\\ \mathbf{elif}\;a \leq -2.9 \cdot 10^{+133}:\\ \;\;\;\;a \cdot b\\ \mathbf{elif}\;a \leq -7.6 \cdot 10^{+107}:\\ \;\;\;\;t \cdot z\\ \mathbf{elif}\;a \leq -1.36 \cdot 10^{+51}:\\ \;\;\;\;y \cdot x\\ \mathbf{elif}\;a \leq -3.3 \cdot 10^{+41}:\\ \;\;\;\;t \cdot z\\ \mathbf{elif}\;a \leq -700000:\\ \;\;\;\;c \cdot i\\ \mathbf{elif}\;a \leq -1.8 \cdot 10^{-141}:\\ \;\;\;\;t \cdot z\\ \mathbf{elif}\;a \leq -2.7 \cdot 10^{-224}:\\ \;\;\;\;y \cdot x\\ \mathbf{elif}\;a \leq 6.1 \cdot 10^{-288}:\\ \;\;\;\;c \cdot i\\ \mathbf{elif}\;a \leq 3.5 \cdot 10^{-144}:\\ \;\;\;\;y \cdot x\\ \mathbf{elif}\;a \leq 8 \cdot 10^{-81}:\\ \;\;\;\;t \cdot z\\ \mathbf{else}:\\ \;\;\;\;a \cdot b\\ \end{array} \]
Alternative 6
Error31.5
Cost1768
\[\begin{array}{l} t_1 := t \cdot z + a \cdot b\\ t_2 := a \cdot b + c \cdot i\\ \mathbf{if}\;x \leq -1.95 \cdot 10^{+254}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -3.35 \cdot 10^{+177}:\\ \;\;\;\;y \cdot x\\ \mathbf{elif}\;x \leq -2 \cdot 10^{+145}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -1.24 \cdot 10^{+116}:\\ \;\;\;\;y \cdot x\\ \mathbf{elif}\;x \leq -32000000000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -2.55 \cdot 10^{-45}:\\ \;\;\;\;t \cdot z + c \cdot i\\ \mathbf{elif}\;x \leq -6.2 \cdot 10^{-190}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 2.75 \cdot 10^{-250}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 1.06 \cdot 10^{-92}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 1.2 \cdot 10^{-35}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\\ \end{array} \]
Alternative 7
Error14.1
Cost1364
\[\begin{array}{l} t_1 := \left(a \cdot b + t \cdot z\right) + c \cdot i\\ t_2 := \left(a \cdot b + y \cdot x\right) + c \cdot i\\ t_3 := t \cdot z + a \cdot b\\ \mathbf{if}\;t \leq -1.35 \cdot 10^{-27}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq 1.22 \cdot 10^{-73}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 8.2 \cdot 10^{+43}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 2.5 \cdot 10^{+96}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 4.2 \cdot 10^{+229}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 7.5 \cdot 10^{+288}:\\ \;\;\;\;y \cdot x + t \cdot z\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 8
Error43.1
Cost1248
\[\begin{array}{l} \mathbf{if}\;a \leq -4.8 \cdot 10^{+192}:\\ \;\;\;\;a \cdot b\\ \mathbf{elif}\;a \leq -4.6 \cdot 10^{+171}:\\ \;\;\;\;c \cdot i\\ \mathbf{elif}\;a \leq -7.4 \cdot 10^{+130}:\\ \;\;\;\;a \cdot b\\ \mathbf{elif}\;a \leq -4.2 \cdot 10^{+116}:\\ \;\;\;\;t \cdot z\\ \mathbf{elif}\;a \leq -540000:\\ \;\;\;\;c \cdot i\\ \mathbf{elif}\;a \leq -1.55 \cdot 10^{-143}:\\ \;\;\;\;t \cdot z\\ \mathbf{elif}\;a \leq 3.5 \cdot 10^{-239}:\\ \;\;\;\;c \cdot i\\ \mathbf{elif}\;a \leq 9 \cdot 10^{-81}:\\ \;\;\;\;t \cdot z\\ \mathbf{else}:\\ \;\;\;\;a \cdot b\\ \end{array} \]
Alternative 9
Error31.9
Cost1240
\[\begin{array}{l} t_1 := a \cdot b + c \cdot i\\ \mathbf{if}\;t \leq -1.45 \cdot 10^{-25}:\\ \;\;\;\;t \cdot z\\ \mathbf{elif}\;t \leq 4.5 \cdot 10^{-186}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 6.8 \cdot 10^{-153}:\\ \;\;\;\;y \cdot x\\ \mathbf{elif}\;t \leq 6.5 \cdot 10^{+92}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 8 \cdot 10^{+143}:\\ \;\;\;\;t \cdot z\\ \mathbf{elif}\;t \leq 3.5 \cdot 10^{+212}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t \cdot z\\ \end{array} \]
Alternative 10
Error15.7
Cost1232
\[\begin{array}{l} t_1 := \left(a \cdot b + t \cdot z\right) + c \cdot i\\ t_2 := y \cdot x + c \cdot i\\ \mathbf{if}\;x \leq -1.25 \cdot 10^{+177}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -2.8 \cdot 10^{+143}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -1.9 \cdot 10^{+118}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 1.7 \cdot 10^{-35}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;y \cdot x + t \cdot z\\ \end{array} \]
Alternative 11
Error6.4
Cost1224
\[\begin{array}{l} \mathbf{if}\;a \cdot b \leq -0.0042:\\ \;\;\;\;\left(a \cdot b + t \cdot z\right) + c \cdot i\\ \mathbf{elif}\;a \cdot b \leq 2.65 \cdot 10^{+70}:\\ \;\;\;\;\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 12
Error37.7
Cost712
\[\begin{array}{l} \mathbf{if}\;a \cdot b \leq -1.7 \cdot 10^{+24}:\\ \;\;\;\;a \cdot b\\ \mathbf{elif}\;a \cdot b \leq 2.8 \cdot 10^{+58}:\\ \;\;\;\;c \cdot i\\ \mathbf{else}:\\ \;\;\;\;a \cdot b\\ \end{array} \]
Alternative 13
Error47.4
Cost192
\[a \cdot b \]

Error

Reproduce?

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