Average Error: 0.1 → 0.1
Time: 13.4s
Precision: binary64
Cost: 960
\[x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right) + y \cdot 5 \]
\[\left(x \cdot \left(\left(y + z\right) \cdot 2\right) + x \cdot t\right) + y \cdot 5 \]
(FPCore (x y z t)
 :precision binary64
 (+ (* x (+ (+ (+ (+ y z) z) y) t)) (* y 5.0)))
(FPCore (x y z t)
 :precision binary64
 (+ (+ (* x (* (+ y z) 2.0)) (* 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) {
	return ((x * ((y + z) * 2.0)) + (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
    code = ((x * ((y + z) * 2.0d0)) + (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) {
	return ((x * ((y + z) * 2.0)) + (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):
	return ((x * ((y + z) * 2.0)) + (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)
	return Float64(Float64(Float64(x * Float64(Float64(y + z) * 2.0)) + 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)
	tmp = ((x * ((y + z) * 2.0)) + (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_] := N[(N[(N[(x * N[(N[(y + z), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision] + N[(x * t), $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
\left(x \cdot \left(\left(y + z\right) \cdot 2\right) + x \cdot t\right) + y \cdot 5

Error

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.1

    \[x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right) + y \cdot 5 \]
  2. Applied egg-rr0.1

    \[\leadsto \color{blue}{\left(x \cdot \left(\left(y + z\right) \cdot 2\right) + x \cdot t\right)} + y \cdot 5 \]
  3. Final simplification0.1

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

Alternatives

Alternative 1
Error9.9
Cost1104
\[\begin{array}{l} t_1 := y \cdot 5 + 2 \cdot \left(x \cdot z\right)\\ t_2 := x \cdot \left(\left(y + z\right) \cdot 2 + t\right)\\ \mathbf{if}\;x \leq -9.399664520910197 \cdot 10^{-13}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -2.710493420732782 \cdot 10^{-77}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -1.1148601298206822 \cdot 10^{-92}:\\ \;\;\;\;x \cdot t\\ \mathbf{elif}\;x \leq 1.6340397480525963 \cdot 10^{-11}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 2
Error26.5
Cost976
\[\begin{array}{l} t_1 := 2 \cdot \left(x \cdot \left(y + z\right)\right)\\ \mathbf{if}\;x \leq -5.821640657580814 \cdot 10^{-52}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -1.1598372584778884 \cdot 10^{-76}:\\ \;\;\;\;y \cdot 5\\ \mathbf{elif}\;x \leq -3.254003894849981 \cdot 10^{-138}:\\ \;\;\;\;x \cdot t\\ \mathbf{elif}\;x \leq 1.710224624000954 \cdot 10^{-15}:\\ \;\;\;\;y \cdot 5\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 3
Error26.4
Cost976
\[\begin{array}{l} \mathbf{if}\;x \leq -9.399664520910197 \cdot 10^{-13}:\\ \;\;\;\;x \cdot \left(t + y \cdot 2\right)\\ \mathbf{elif}\;x \leq -1.1598372584778884 \cdot 10^{-76}:\\ \;\;\;\;y \cdot 5\\ \mathbf{elif}\;x \leq -3.254003894849981 \cdot 10^{-138}:\\ \;\;\;\;x \cdot t\\ \mathbf{elif}\;x \leq 1.710224624000954 \cdot 10^{-15}:\\ \;\;\;\;y \cdot 5\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(x \cdot \left(y + z\right)\right)\\ \end{array} \]
Alternative 4
Error19.7
Cost976
\[\begin{array}{l} t_1 := x \cdot \left(t + z \cdot 2\right)\\ \mathbf{if}\;y \leq -3.371896834192484 \cdot 10^{+76}:\\ \;\;\;\;y \cdot 5\\ \mathbf{elif}\;y \leq -4.7016550180962944 \cdot 10^{+30}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -8.850455521446088 \cdot 10^{-28}:\\ \;\;\;\;y \cdot 5\\ \mathbf{elif}\;y \leq 5.573454616976714 \cdot 10^{+22}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;y \cdot 5\\ \end{array} \]
Alternative 5
Error14.2
Cost972
\[\begin{array}{l} t_1 := y \cdot \left(5 + x \cdot 2\right)\\ \mathbf{if}\;y \leq -8.850455521446088 \cdot 10^{-28}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 2.2353329587320628 \cdot 10^{-23}:\\ \;\;\;\;x \cdot \left(t + z \cdot 2\right)\\ \mathbf{elif}\;y \leq 1.1478279949384903 \cdot 10^{+35}:\\ \;\;\;\;y \cdot 5 + 2 \cdot \left(x \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 6
Error14.2
Cost972
\[\begin{array}{l} t_1 := 2 \cdot \left(x \cdot z\right)\\ t_2 := y \cdot \left(5 + x \cdot 2\right)\\ \mathbf{if}\;y \leq -8.850455521446088 \cdot 10^{-28}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 2.2353329587320628 \cdot 10^{-23}:\\ \;\;\;\;t_1 + x \cdot t\\ \mathbf{elif}\;y \leq 1.1478279949384903 \cdot 10^{+35}:\\ \;\;\;\;y \cdot 5 + t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 7
Error0.7
Cost968
\[\begin{array}{l} t_1 := x \cdot \left(\left(y + z\right) \cdot 2 + t\right)\\ \mathbf{if}\;x \leq -107.97529457520649:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 0.011247021440946504:\\ \;\;\;\;y \cdot 5 + x \cdot \left(t + z \cdot 2\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 8
Error0.1
Cost832
\[x \cdot \left(\left(y + z\right) \cdot 2 + t\right) + y \cdot 5 \]
Alternative 9
Error31.8
Cost720
\[\begin{array}{l} \mathbf{if}\;y \leq -8.850455521446088 \cdot 10^{-28}:\\ \;\;\;\;y \cdot 5\\ \mathbf{elif}\;y \leq -3.7324448801607866 \cdot 10^{-240}:\\ \;\;\;\;x \cdot t\\ \mathbf{elif}\;y \leq 2.2810509960991402 \cdot 10^{-216}:\\ \;\;\;\;x \cdot \left(z \cdot 2\right)\\ \mathbf{elif}\;y \leq 2.2353329587320628 \cdot 10^{-23}:\\ \;\;\;\;x \cdot t\\ \mathbf{else}:\\ \;\;\;\;y \cdot 5\\ \end{array} \]
Alternative 10
Error14.2
Cost712
\[\begin{array}{l} t_1 := y \cdot \left(5 + x \cdot 2\right)\\ \mathbf{if}\;y \leq -8.850455521446088 \cdot 10^{-28}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 5.168095856406694 \cdot 10^{-9}:\\ \;\;\;\;x \cdot \left(t + z \cdot 2\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 11
Error32.0
Cost456
\[\begin{array}{l} \mathbf{if}\;y \leq -8.850455521446088 \cdot 10^{-28}:\\ \;\;\;\;y \cdot 5\\ \mathbf{elif}\;y \leq 2.2353329587320628 \cdot 10^{-23}:\\ \;\;\;\;x \cdot t\\ \mathbf{else}:\\ \;\;\;\;y \cdot 5\\ \end{array} \]
Alternative 12
Error47.3
Cost192
\[x \cdot t \]

Error

Reproduce

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