?

Average Error: 0.1 → 0.1
Time: 8.6s
Precision: binary64
Cost: 576

?

\[\left(x \cdot y + z\right) \cdot y + t \]
\[t + y \cdot \left(z + x \cdot y\right) \]
(FPCore (x y z t) :precision binary64 (+ (* (+ (* x y) z) y) t))
(FPCore (x y z t) :precision binary64 (+ t (* y (+ z (* x y)))))
double code(double x, double y, double z, double t) {
	return (((x * y) + z) * y) + t;
}
double code(double x, double y, double z, double t) {
	return t + (y * (z + (x * y)));
}
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) * y) + t
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 = t + (y * (z + (x * y)))
end function
public static double code(double x, double y, double z, double t) {
	return (((x * y) + z) * y) + t;
}
public static double code(double x, double y, double z, double t) {
	return t + (y * (z + (x * y)));
}
def code(x, y, z, t):
	return (((x * y) + z) * y) + t
def code(x, y, z, t):
	return t + (y * (z + (x * y)))
function code(x, y, z, t)
	return Float64(Float64(Float64(Float64(x * y) + z) * y) + t)
end
function code(x, y, z, t)
	return Float64(t + Float64(y * Float64(z + Float64(x * y))))
end
function tmp = code(x, y, z, t)
	tmp = (((x * y) + z) * y) + t;
end
function tmp = code(x, y, z, t)
	tmp = t + (y * (z + (x * y)));
end
code[x_, y_, z_, t_] := N[(N[(N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision] * y), $MachinePrecision] + t), $MachinePrecision]
code[x_, y_, z_, t_] := N[(t + N[(y * N[(z + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\left(x \cdot y + z\right) \cdot y + t
t + y \cdot \left(z + x \cdot y\right)

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Initial program 0.1

    \[\left(x \cdot y + z\right) \cdot y + t \]
  2. Final simplification0.1

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

Alternatives

Alternative 1
Error25.3
Cost720
\[\begin{array}{l} \mathbf{if}\;z \leq -4.8 \cdot 10^{+92}:\\ \;\;\;\;y \cdot z\\ \mathbf{elif}\;z \leq 16500:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{+22}:\\ \;\;\;\;y \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{+50}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;y \cdot z\\ \end{array} \]
Alternative 2
Error9.3
Cost713
\[\begin{array}{l} \mathbf{if}\;y \leq -0.06 \lor \neg \left(y \leq 4.8 \cdot 10^{-18}\right):\\ \;\;\;\;y \cdot \left(z + x \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;t + y \cdot z\\ \end{array} \]
Alternative 3
Error5.0
Cost713
\[\begin{array}{l} \mathbf{if}\;z \leq -1.35 \cdot 10^{+40} \lor \neg \left(z \leq 3.2 \cdot 10^{+22}\right):\\ \;\;\;\;t + y \cdot z\\ \mathbf{else}:\\ \;\;\;\;t + y \cdot \left(x \cdot y\right)\\ \end{array} \]
Alternative 4
Error25.1
Cost456
\[\begin{array}{l} \mathbf{if}\;z \leq -2.8 \cdot 10^{+98}:\\ \;\;\;\;y \cdot z\\ \mathbf{elif}\;z \leq 5 \cdot 10^{+52}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;y \cdot z\\ \end{array} \]
Alternative 5
Error13.5
Cost452
\[\begin{array}{l} \mathbf{if}\;x \leq -1.6 \cdot 10^{+240}:\\ \;\;\;\;y \cdot \left(x \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;t + y \cdot z\\ \end{array} \]
Alternative 6
Error29.2
Cost64
\[t \]

Error

Reproduce?

herbie shell --seed 2023066 
(FPCore (x y z t)
  :name "Language.Haskell.HsColour.ColourHighlight:unbase from hscolour-1.23"
  :precision binary64
  (+ (* (+ (* x y) z) y) t))