?

Average Error: 0.1 → 0.1
Time: 22.5s
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
Error9.8
Cost712
\[\begin{array}{l} t_1 := \left(y \cdot x + z\right) \cdot y\\ \mathbf{if}\;y \leq -4.1 \cdot 10^{+37}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 4.4 \cdot 10^{+70}:\\ \;\;\;\;z \cdot y + t\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 2
Error5.2
Cost712
\[\begin{array}{l} t_1 := z \cdot y + t\\ \mathbf{if}\;z \leq -1.42 \cdot 10^{-39}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{-33}:\\ \;\;\;\;\left(y \cdot x\right) \cdot y + t\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 3
Error26.8
Cost584
\[\begin{array}{l} t_1 := \left(y \cdot x\right) \cdot y\\ \mathbf{if}\;y \leq -3.7 \cdot 10^{+49}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 6 \cdot 10^{+69}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 4
Error12.8
Cost584
\[\begin{array}{l} t_1 := \left(y \cdot x\right) \cdot y\\ \mathbf{if}\;y \leq -3.2 \cdot 10^{+64}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 8 \cdot 10^{+101}:\\ \;\;\;\;z \cdot y + t\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 5
Error25.9
Cost456
\[\begin{array}{l} \mathbf{if}\;t \leq -1.45 \cdot 10^{-88}:\\ \;\;\;\;t\\ \mathbf{elif}\;t \leq 2 \cdot 10^{+25}:\\ \;\;\;\;z \cdot y\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
Alternative 6
Error30.0
Cost64
\[t \]

Error

Reproduce?

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