?

Average Error: 0.1 → 0.1
Time: 11.9s
Precision: binary64
Cost: 960

?

\[x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right) + y \cdot 5 \]
\[x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + 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) z) y) 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) + z) + y) + 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) + z) + y) + 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) + z) + y) + 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) + z) + y) + 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(x * Float64(Float64(Float64(Float64(y + z) + z) + y) + 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) + z) + y) + 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[(x * N[(N[(N[(N[(y + z), $MachinePrecision] + z), $MachinePrecision] + y), $MachinePrecision] + 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
x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + 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. Final simplification0.1

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

Alternatives

Alternative 1
Error10.1
Cost1496
\[\begin{array}{l} t_1 := z \cdot \left(2 \cdot x\right) + y \cdot 5\\ t_2 := \left(2 \cdot z + \left(2 \cdot y + t\right)\right) \cdot x\\ \mathbf{if}\;x \leq -4.1 \cdot 10^{-10}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -4.1 \cdot 10^{-125}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -1.15 \cdot 10^{-144}:\\ \;\;\;\;t \cdot x + x \cdot \left(2 \cdot z\right)\\ \mathbf{elif}\;x \leq 1.3 \cdot 10^{-84}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 1.02 \cdot 10^{-53}:\\ \;\;\;\;t \cdot x + y \cdot 5\\ \mathbf{elif}\;x \leq 1.05 \cdot 10^{-16}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 2
Error10.2
Cost1496
\[\begin{array}{l} t_1 := z \cdot \left(2 \cdot x\right) + y \cdot 5\\ t_2 := x \cdot \left(2 \cdot \left(z + y\right)\right) + t \cdot x\\ \mathbf{if}\;x \leq -4.05 \cdot 10^{-10}:\\ \;\;\;\;\left(2 \cdot z + \left(2 \cdot y + t\right)\right) \cdot x\\ \mathbf{elif}\;x \leq -3.8 \cdot 10^{-125}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -1.15 \cdot 10^{-144}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 6.4 \cdot 10^{-87}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 9 \cdot 10^{-53}:\\ \;\;\;\;t \cdot x + y \cdot 5\\ \mathbf{elif}\;x \leq 1.66 \cdot 10^{-16}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 3
Error10.1
Cost1496
\[\begin{array}{l} t_1 := \left(2 \cdot x\right) \cdot \left(z + y\right) + y \cdot 5\\ t_2 := x \cdot \left(2 \cdot \left(z + y\right)\right) + t \cdot x\\ \mathbf{if}\;x \leq -7 \cdot 10^{-10}:\\ \;\;\;\;\left(2 \cdot z + \left(2 \cdot y + t\right)\right) \cdot x\\ \mathbf{elif}\;x \leq -3.5 \cdot 10^{-125}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq -1.15 \cdot 10^{-144}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq 6.5 \cdot 10^{-87}:\\ \;\;\;\;z \cdot \left(2 \cdot x\right) + y \cdot 5\\ \mathbf{elif}\;x \leq 2.8 \cdot 10^{-53}:\\ \;\;\;\;t \cdot x + y \cdot 5\\ \mathbf{elif}\;x \leq 1.2 \cdot 10^{-5}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 4
Error14.7
Cost1108
\[\begin{array}{l} t_1 := y \cdot \left(5 + 2 \cdot x\right)\\ \mathbf{if}\;y \leq -5.5 \cdot 10^{+157}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -1.55 \cdot 10^{-93}:\\ \;\;\;\;z \cdot \left(2 \cdot x\right) + y \cdot 5\\ \mathbf{elif}\;y \leq 1.9 \cdot 10^{-95}:\\ \;\;\;\;\left(2 \cdot z + t\right) \cdot x\\ \mathbf{elif}\;y \leq 4.7 \cdot 10^{-28}:\\ \;\;\;\;t \cdot x + y \cdot 5\\ \mathbf{elif}\;y \leq 9800000:\\ \;\;\;\;x \cdot \left(z + \left(t + z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 5
Error0.6
Cost1096
\[\begin{array}{l} \mathbf{if}\;x \leq -22000:\\ \;\;\;\;\left(2 \cdot z + \left(2 \cdot y + t\right)\right) \cdot x\\ \mathbf{elif}\;x \leq 0.0035:\\ \;\;\;\;x \cdot \left(\left(y + z\right) + \left(z + t\right)\right) + y \cdot 5\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(2 \cdot \left(z + y\right)\right) + t \cdot x\\ \end{array} \]
Alternative 6
Error31.3
Cost980
\[\begin{array}{l} t_1 := y \cdot \left(x - -5\right)\\ t_2 := 2 \cdot \left(z \cdot x\right)\\ \mathbf{if}\;y \leq -200000000000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 3 \cdot 10^{-305}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 5.2 \cdot 10^{-263}:\\ \;\;\;\;x \cdot t\\ \mathbf{elif}\;y \leq 1.45 \cdot 10^{-208}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 4000:\\ \;\;\;\;x \cdot t\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 7
Error15.5
Cost976
\[\begin{array}{l} t_1 := y \cdot \left(5 + 2 \cdot x\right)\\ \mathbf{if}\;y \leq -1.35 \cdot 10^{+72}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 4.8 \cdot 10^{-96}:\\ \;\;\;\;\left(2 \cdot z + t\right) \cdot x\\ \mathbf{elif}\;y \leq 2.2 \cdot 10^{-27}:\\ \;\;\;\;t \cdot x + y \cdot 5\\ \mathbf{elif}\;y \leq 15600:\\ \;\;\;\;x \cdot \left(z + \left(t + z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 8
Error0.1
Cost960
\[x \cdot \left(\left(y + z\right) + \left(z + t\right)\right) + y \cdot \left(5 + x\right) \]
Alternative 9
Error31.9
Cost852
\[\begin{array}{l} t_1 := 2 \cdot \left(z \cdot x\right)\\ \mathbf{if}\;y \leq -82000000000:\\ \;\;\;\;y \cdot 5\\ \mathbf{elif}\;y \leq 1.45 \cdot 10^{-305}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 1.7 \cdot 10^{-262}:\\ \;\;\;\;x \cdot t\\ \mathbf{elif}\;y \leq 1.56 \cdot 10^{-208}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 27500:\\ \;\;\;\;x \cdot t\\ \mathbf{else}:\\ \;\;\;\;y \cdot 5\\ \end{array} \]
Alternative 10
Error32.2
Cost720
\[\begin{array}{l} \mathbf{if}\;x \leq -5 \cdot 10^{-10}:\\ \;\;\;\;x \cdot t\\ \mathbf{elif}\;x \leq -3.5 \cdot 10^{-125}:\\ \;\;\;\;y \cdot 5\\ \mathbf{elif}\;x \leq -1.15 \cdot 10^{-144}:\\ \;\;\;\;x \cdot t\\ \mathbf{elif}\;x \leq 1.02 \cdot 10^{-16}:\\ \;\;\;\;y \cdot 5\\ \mathbf{else}:\\ \;\;\;\;x \cdot t\\ \end{array} \]
Alternative 11
Error17.9
Cost712
\[\begin{array}{l} t_1 := y \cdot \left(x - -5\right)\\ \mathbf{if}\;y \leq -6 \cdot 10^{+14}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 205000:\\ \;\;\;\;x \cdot \left(z + \left(t + z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 12
Error14.3
Cost712
\[\begin{array}{l} t_1 := y \cdot \left(5 + 2 \cdot x\right)\\ \mathbf{if}\;y \leq -1 \cdot 10^{+14}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 7600:\\ \;\;\;\;x \cdot \left(z + \left(t + z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 13
Error15.2
Cost712
\[\begin{array}{l} t_1 := y \cdot \left(5 + 2 \cdot x\right)\\ \mathbf{if}\;y \leq -1.35 \cdot 10^{+72}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 25500000:\\ \;\;\;\;\left(2 \cdot z + t\right) \cdot x\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 14
Error46.9
Cost192
\[x \cdot t \]

Error

Reproduce?

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