?

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

?

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

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 \left(x \cdot y + z\right) \cdot y + t \]

Alternatives

Alternative 1
Error26.8
Cost720
\[\begin{array}{l} \mathbf{if}\;z \leq -3.5 \cdot 10^{+89}:\\ \;\;\;\;z \cdot y\\ \mathbf{elif}\;z \leq -3.5 \cdot 10^{-177}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -2.5 \cdot 10^{-218}:\\ \;\;\;\;x \cdot \left(y \cdot y\right)\\ \mathbf{elif}\;z \leq 1.55 \cdot 10^{+141}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;z \cdot y\\ \end{array} \]
Alternative 2
Error27.1
Cost716
\[\begin{array}{l} t_1 := \left(y \cdot x\right) \cdot y\\ \mathbf{if}\;y \leq -4 \cdot 10^{-57}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 1.5 \cdot 10^{-79}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 260000:\\ \;\;\;\;z \cdot y\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 3
Error10.3
Cost712
\[\begin{array}{l} t_1 := \left(y \cdot x + z\right) \cdot y\\ \mathbf{if}\;y \leq -7.5 \cdot 10^{-57}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 105:\\ \;\;\;\;z \cdot y + t\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 4
Error8.2
Cost712
\[\begin{array}{l} t_1 := z \cdot y + t\\ \mathbf{if}\;z \leq -7 \cdot 10^{-54}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 9000000000000:\\ \;\;\;\;x \cdot \left(y \cdot y\right) + t\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 5
Error5.0
Cost712
\[\begin{array}{l} t_1 := z \cdot y + t\\ \mathbf{if}\;z \leq -3.7 \cdot 10^{-53}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 95000000000000:\\ \;\;\;\;\left(y \cdot x\right) \cdot y + t\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 6
Error13.6
Cost584
\[\begin{array}{l} t_1 := \left(y \cdot x\right) \cdot y\\ \mathbf{if}\;y \leq -1000000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 9.5 \cdot 10^{+156}:\\ \;\;\;\;z \cdot y + t\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 7
Error25.8
Cost456
\[\begin{array}{l} \mathbf{if}\;z \leq -6.5 \cdot 10^{+85}:\\ \;\;\;\;z \cdot y\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{+142}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;z \cdot y\\ \end{array} \]
Alternative 8
Error29.5
Cost64
\[t \]

Error

Reproduce?

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