?

Average Accuracy: 99.9% → 99.9%
Time: 14.4s
Precision: binary64
Cost: 1216

?

\[x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right) + y \cdot 5 \]
\[\begin{array}{l} t_1 := x \cdot \left(y + z\right)\\ \left(t_1 + \left(t_1 + x \cdot t\right)\right) + y \cdot 5 \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (+ (* x (+ (+ (+ (+ y z) z) y) t)) (* y 5.0)))
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* x (+ y z)))) (+ (+ t_1 (+ t_1 (* x t))) (* y 5.0))))
double code(double x, double y, double z, double t) {
	return (x * ((((y + z) + z) + y) + t)) + (y * 5.0);
}
double code(double x, double y, double z, double t) {
	double t_1 = x * (y + z);
	return (t_1 + (t_1 + (x * t))) + (y * 5.0);
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = (x * ((((y + z) + z) + y) + t)) + (y * 5.0d0)
end function
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    t_1 = x * (y + z)
    code = (t_1 + (t_1 + (x * t))) + (y * 5.0d0)
end function
public static double code(double x, double y, double z, double t) {
	return (x * ((((y + z) + z) + y) + t)) + (y * 5.0);
}
public static double code(double x, double y, double z, double t) {
	double t_1 = x * (y + z);
	return (t_1 + (t_1 + (x * t))) + (y * 5.0);
}
def code(x, y, z, t):
	return (x * ((((y + z) + z) + y) + t)) + (y * 5.0)
def code(x, y, z, t):
	t_1 = x * (y + z)
	return (t_1 + (t_1 + (x * t))) + (y * 5.0)
function code(x, y, z, t)
	return Float64(Float64(x * Float64(Float64(Float64(Float64(y + z) + z) + y) + t)) + Float64(y * 5.0))
end
function code(x, y, z, t)
	t_1 = Float64(x * Float64(y + z))
	return Float64(Float64(t_1 + Float64(t_1 + Float64(x * t))) + Float64(y * 5.0))
end
function tmp = code(x, y, z, t)
	tmp = (x * ((((y + z) + z) + y) + t)) + (y * 5.0);
end
function tmp = code(x, y, z, t)
	t_1 = x * (y + z);
	tmp = (t_1 + (t_1 + (x * t))) + (y * 5.0);
end
code[x_, y_, z_, t_] := N[(N[(x * N[(N[(N[(N[(y + z), $MachinePrecision] + z), $MachinePrecision] + y), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision] + N[(y * 5.0), $MachinePrecision]), $MachinePrecision]
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(y + z), $MachinePrecision]), $MachinePrecision]}, N[(N[(t$95$1 + N[(t$95$1 + N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * 5.0), $MachinePrecision]), $MachinePrecision]]
x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right) + y \cdot 5
\begin{array}{l}
t_1 := x \cdot \left(y + z\right)\\
\left(t_1 + \left(t_1 + x \cdot t\right)\right) + y \cdot 5
\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Initial program 99.9%

    \[x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right) + y \cdot 5 \]
  2. Applied egg-rr99.9%

    \[\leadsto \color{blue}{\left(\left(x \cdot t + \left(y + z\right) \cdot x\right) + \left(y + z\right) \cdot x\right)} + y \cdot 5 \]
    Proof

    [Start]99.9

    \[ x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right) + y \cdot 5 \]

    distribute-lft-in [=>]99.9

    \[ \color{blue}{\left(x \cdot \left(\left(\left(y + z\right) + z\right) + y\right) + x \cdot t\right)} + y \cdot 5 \]

    +-commutative [=>]99.9

    \[ \color{blue}{\left(x \cdot t + x \cdot \left(\left(\left(y + z\right) + z\right) + y\right)\right)} + y \cdot 5 \]

    *-commutative [<=]99.9

    \[ \left(\color{blue}{t \cdot x} + x \cdot \left(\left(\left(y + z\right) + z\right) + y\right)\right) + y \cdot 5 \]

    associate-+l+ [=>]99.9

    \[ \left(t \cdot x + x \cdot \color{blue}{\left(\left(y + z\right) + \left(z + y\right)\right)}\right) + y \cdot 5 \]

    +-commutative [<=]99.9

    \[ \left(t \cdot x + x \cdot \left(\left(y + z\right) + \color{blue}{\left(y + z\right)}\right)\right) + y \cdot 5 \]

    distribute-rgt-in [=>]99.9

    \[ \left(t \cdot x + \color{blue}{\left(\left(y + z\right) \cdot x + \left(y + z\right) \cdot x\right)}\right) + y \cdot 5 \]

    associate-+r+ [=>]99.9

    \[ \color{blue}{\left(\left(t \cdot x + \left(y + z\right) \cdot x\right) + \left(y + z\right) \cdot x\right)} + y \cdot 5 \]

    *-commutative [=>]99.9

    \[ \left(\left(\color{blue}{x \cdot t} + \left(y + z\right) \cdot x\right) + \left(y + z\right) \cdot x\right) + y \cdot 5 \]
  3. Final simplification99.9%

    \[\leadsto \left(x \cdot \left(y + z\right) + \left(x \cdot \left(y + z\right) + x \cdot t\right)\right) + y \cdot 5 \]

Alternatives

Alternative 1
Accuracy86.5%
Cost1498
\[\begin{array}{l} t_1 := y \cdot 5 + x \cdot t\\ \mathbf{if}\;t \leq -6 \cdot 10^{+186}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -4 \cdot 10^{+147}:\\ \;\;\;\;x \cdot \left(t + \left(y + z\right) \cdot 2\right)\\ \mathbf{elif}\;t \leq -8.6 \cdot 10^{+17} \lor \neg \left(t \leq 14.5\right) \land \left(t \leq 1.6 \cdot 10^{+30} \lor \neg \left(t \leq 5.8 \cdot 10^{+111}\right)\right):\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;y \cdot 5 + \left(x \cdot \left(y + z\right)\right) \cdot 2\\ \end{array} \]
Alternative 2
Accuracy72.7%
Cost1372
\[\begin{array}{l} t_1 := y \cdot 5 + x \cdot t\\ t_2 := x \cdot \left(t + z \cdot 2\right)\\ t_3 := \left(y + z\right) \cdot \left(x \cdot 2\right)\\ \mathbf{if}\;x \leq -1.3 \cdot 10^{-32}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 4.5 \cdot 10^{-132}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 7.5 \cdot 10^{-100}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 1.6 \cdot 10^{-22}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 2.5 \cdot 10^{+46}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x \leq 6 \cdot 10^{+87}:\\ \;\;\;\;x \cdot \left(t + y \cdot 2\right)\\ \mathbf{elif}\;x \leq 9.5 \cdot 10^{+122}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 3
Accuracy48.3%
Cost1245
\[\begin{array}{l} t_1 := 2 \cdot \left(x \cdot z\right)\\ \mathbf{if}\;x \leq -4.6 \cdot 10^{-34}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 2.65 \cdot 10^{-132}:\\ \;\;\;\;y \cdot 5\\ \mathbf{elif}\;x \leq 1.75 \cdot 10^{-100}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 1.1 \cdot 10^{-20}:\\ \;\;\;\;y \cdot 5\\ \mathbf{elif}\;x \leq 1.25 \cdot 10^{+45}:\\ \;\;\;\;2 \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;x \leq 8.1 \cdot 10^{+52} \lor \neg \left(x \leq 3.1 \cdot 10^{+122}\right):\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x \cdot t\\ \end{array} \]
Alternative 4
Accuracy48.5%
Cost1245
\[\begin{array}{l} t_1 := 2 \cdot \left(x \cdot z\right)\\ \mathbf{if}\;x \leq -5.7 \cdot 10^{-30}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 7.2 \cdot 10^{-132}:\\ \;\;\;\;y \cdot \left(x + 5\right)\\ \mathbf{elif}\;x \leq 1.98 \cdot 10^{-100}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 1.1 \cdot 10^{-20}:\\ \;\;\;\;y \cdot 5\\ \mathbf{elif}\;x \leq 1.05 \cdot 10^{+45}:\\ \;\;\;\;2 \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;x \leq 9.8 \cdot 10^{+45} \lor \neg \left(x \leq 3.5 \cdot 10^{+127}\right):\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x \cdot t\\ \end{array} \]
Alternative 5
Accuracy83.5%
Cost1232
\[\begin{array}{l} t_1 := \left(y + z\right) \cdot 2\\ \mathbf{if}\;x \leq -8 \cdot 10^{-34}:\\ \;\;\;\;x \cdot \left(t + t_1\right)\\ \mathbf{elif}\;x \leq 7.2 \cdot 10^{-132}:\\ \;\;\;\;y \cdot 5 + x \cdot t\\ \mathbf{elif}\;x \leq 9.2 \cdot 10^{-102}:\\ \;\;\;\;x \cdot \left(t + z \cdot 2\right)\\ \mathbf{elif}\;x \leq 7.2 \cdot 10^{-34}:\\ \;\;\;\;y \cdot 5 + x \cdot \left(z + z\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot t_1 + x \cdot t\\ \end{array} \]
Alternative 6
Accuracy61.5%
Cost1108
\[\begin{array}{l} t_1 := x \cdot \left(t + y \cdot 2\right)\\ t_2 := y \cdot \left(5 + x \cdot 2\right)\\ \mathbf{if}\;y \leq -6.1 \cdot 10^{-50}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -1.4 \cdot 10^{-108}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 2.15 \cdot 10^{-187}:\\ \;\;\;\;\left(y + z\right) \cdot \left(x \cdot 2\right)\\ \mathbf{elif}\;y \leq 1.65 \cdot 10^{-84}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 6.5 \cdot 10^{-49}:\\ \;\;\;\;2 \cdot \left(x \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 7
Accuracy83.5%
Cost1104
\[\begin{array}{l} t_1 := x \cdot \left(t + \left(y + z\right) \cdot 2\right)\\ \mathbf{if}\;x \leq -4.3 \cdot 10^{-33}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 7.2 \cdot 10^{-132}:\\ \;\;\;\;y \cdot 5 + x \cdot t\\ \mathbf{elif}\;x \leq 9.5 \cdot 10^{-102}:\\ \;\;\;\;x \cdot \left(t + z \cdot 2\right)\\ \mathbf{elif}\;x \leq 1.1 \cdot 10^{-34}:\\ \;\;\;\;y \cdot 5 + x \cdot \left(z + z\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 8
Accuracy98.4%
Cost1096
\[\begin{array}{l} t_1 := \left(y + z\right) \cdot 2\\ \mathbf{if}\;x \leq -2.5:\\ \;\;\;\;x \cdot \left(t + t_1\right)\\ \mathbf{elif}\;x \leq 1.1 \cdot 10^{-20}:\\ \;\;\;\;y \cdot 5 + \left(x \cdot \left(t + z\right) + x \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot t_1 + x \cdot t\\ \end{array} \]
Alternative 9
Accuracy58.8%
Cost977
\[\begin{array}{l} t_1 := \left(y + z\right) \cdot \left(x \cdot 2\right)\\ \mathbf{if}\;x \leq -7 \cdot 10^{-31}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 7.2 \cdot 10^{-132}:\\ \;\;\;\;y \cdot \left(x + 5\right)\\ \mathbf{elif}\;x \leq 1.7 \cdot 10^{+47} \lor \neg \left(x \leq 7.6 \cdot 10^{+126}\right):\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(t + y \cdot 2\right)\\ \end{array} \]
Alternative 10
Accuracy58.4%
Cost976
\[\begin{array}{l} t_1 := x \cdot \left(t + y \cdot 2\right)\\ \mathbf{if}\;x \leq -2.3 \cdot 10^{-38}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 7.2 \cdot 10^{-132}:\\ \;\;\;\;y \cdot \left(x + 5\right)\\ \mathbf{elif}\;x \leq 7.5 \cdot 10^{-100}:\\ \;\;\;\;2 \cdot \left(x \cdot z\right)\\ \mathbf{elif}\;x \leq 6.6 \cdot 10^{-34}:\\ \;\;\;\;y \cdot 5\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 11
Accuracy99.9%
Cost960
\[y \cdot 5 + x \cdot \left(t + \left(y + \left(z + \left(y + z\right)\right)\right)\right) \]
Alternative 12
Accuracy99.9%
Cost960
\[\left(y \cdot 5 + x \cdot \left(\left(y + z\right) \cdot 2\right)\right) + x \cdot t \]
Alternative 13
Accuracy82.6%
Cost841
\[\begin{array}{l} \mathbf{if}\;x \leq -5.7 \cdot 10^{-30} \lor \neg \left(x \leq 4.5 \cdot 10^{-132}\right):\\ \;\;\;\;x \cdot \left(t + \left(y + z\right) \cdot 2\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot 5 + x \cdot t\\ \end{array} \]
Alternative 14
Accuracy48.3%
Cost720
\[\begin{array}{l} \mathbf{if}\;y \leq -3.3 \cdot 10^{+119}:\\ \;\;\;\;y \cdot 5\\ \mathbf{elif}\;y \leq -1.4 \cdot 10^{+69}:\\ \;\;\;\;2 \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;y \leq -9.2 \cdot 10^{-51}:\\ \;\;\;\;y \cdot 5\\ \mathbf{elif}\;y \leq 8.2 \cdot 10^{-32}:\\ \;\;\;\;x \cdot t\\ \mathbf{else}:\\ \;\;\;\;y \cdot 5\\ \end{array} \]
Alternative 15
Accuracy76.3%
Cost713
\[\begin{array}{l} \mathbf{if}\;y \leq -6.8 \cdot 10^{+62} \lor \neg \left(y \leq 3.25 \cdot 10^{-46}\right):\\ \;\;\;\;y \cdot \left(5 + x \cdot 2\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(t + z \cdot 2\right)\\ \end{array} \]
Alternative 16
Accuracy48.9%
Cost456
\[\begin{array}{l} \mathbf{if}\;x \leq -2.6 \cdot 10^{-37}:\\ \;\;\;\;x \cdot t\\ \mathbf{elif}\;x \leq 5.5 \cdot 10^{-34}:\\ \;\;\;\;y \cdot 5\\ \mathbf{else}:\\ \;\;\;\;x \cdot t\\ \end{array} \]
Alternative 17
Accuracy25.6%
Cost192
\[x \cdot t \]

Error

Reproduce?

herbie shell --seed 2023133 
(FPCore (x y z t)
  :name "Graphics.Rendering.Plot.Render.Plot.Legend:renderLegendOutside from plot-0.2.3.4, B"
  :precision binary64
  (+ (* x (+ (+ (+ (+ y z) z) y) t)) (* y 5.0)))