Average Error: 0.1 → 0.1
Time: 6.3s
Precision: binary64
Cost: 576
\[\left(x \cdot y + z\right) \cdot y + t\]
\[t + y \cdot \left(y \cdot x + z\right)\]
\left(x \cdot y + z\right) \cdot y + t
t + y \cdot \left(y \cdot x + z\right)
(FPCore (x y z t) :precision binary64 (+ (* (+ (* x y) z) y) t))
(FPCore (x y z t) :precision binary64 (+ t (* y (+ (* y x) z))))
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 * ((y * x) + z));
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Alternatives

Alternative 1
Error11.1
Cost1229
\[\begin{array}{l} \mathbf{if}\;t \leq -5.780740526639809 \cdot 10^{-15}:\\ \;\;\;\;t + y \cdot \left(y \cdot x\right)\\ \mathbf{elif}\;t \leq -3.5270538828713833 \cdot 10^{-44} \lor \neg \left(t \leq -1.3982040806938495 \cdot 10^{-107}\right) \land t \leq 2.92109186513925 \cdot 10^{-111}:\\ \;\;\;\;y \cdot \left(y \cdot x + z\right)\\ \mathbf{else}:\\ \;\;\;\;t + y \cdot z\\ \end{array}\]
Alternative 2
Error4.9
Cost776
\[\begin{array}{l} \mathbf{if}\;z \leq -8.565608340072335 \cdot 10^{+32} \lor \neg \left(z \leq 1.572561595081844 \cdot 10^{-28}\right):\\ \;\;\;\;t + y \cdot z\\ \mathbf{else}:\\ \;\;\;\;t + y \cdot \left(y \cdot x\right)\\ \end{array}\]
Alternative 3
Error12.6
Cost641
\[\begin{array}{l} \mathbf{if}\;y \leq -1.9343787463871016 \cdot 10^{+76}:\\ \;\;\;\;y \cdot \left(y \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;t + y \cdot z\\ \end{array}\]
Alternative 4
Error25.1
Cost973
\[\begin{array}{l} \mathbf{if}\;t \leq -5.780740526639809 \cdot 10^{-15}:\\ \;\;\;\;t\\ \mathbf{elif}\;t \leq -8.94629698326712 \cdot 10^{-39} \lor \neg \left(t \leq -3.2060202156294776 \cdot 10^{-80}\right) \land t \leq 9.511882993591529 \cdot 10^{-110}:\\ \;\;\;\;y \cdot z\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array}\]
Alternative 5
Error30.0
Cost64
\[t\]
Alternative 6
Error61.9
Cost64
\[-1\]
Alternative 7
Error61.9
Cost64
\[1\]

Error

Derivation

  1. Initial program 0.1

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

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

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

Reproduce

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