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

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
Error0.1
Cost832
\[y \cdot 5 + x \cdot \left(\left(y + z\right) \cdot 2 + t\right)\]
Alternative 2
Error1.0
Cost1032
\[\begin{array}{l} \mathbf{if}\;x \leq -6.045857025122821 \cdot 10^{+21} \lor \neg \left(x \leq 0.8561757869615914\right):\\ \;\;\;\;x \cdot \left(\left(y + z\right) \cdot 2 + t\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot 5 + x \cdot \left(t + z \cdot 2\right)\\ \end{array}\]
Alternative 3
Error9.7
Cost1539
\[\begin{array}{l} \mathbf{if}\;x \leq -1.6091622211154084 \cdot 10^{-17}:\\ \;\;\;\;x \cdot \left(\left(y + z\right) \cdot 2 + t\right)\\ \mathbf{elif}\;x \leq -2.9901408908015203 \cdot 10^{-297}:\\ \;\;\;\;y \cdot 5 + x \cdot \left(z \cdot 2\right)\\ \mathbf{elif}\;x \leq 1.9457901601409992 \cdot 10^{-35}:\\ \;\;\;\;y \cdot 5 + x \cdot t\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\left(y + z\right) \cdot 2 + t\right)\\ \end{array}\]
Alternative 4
Error9.5
Cost904
\[\begin{array}{l} \mathbf{if}\;x \leq -0.0004464906834746913 \lor \neg \left(x \leq 1.0084409790173604 \cdot 10^{-35}\right):\\ \;\;\;\;x \cdot \left(\left(y + z\right) \cdot 2 + t\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot 5 + x \cdot t\\ \end{array}\]
Alternative 5
Error14.6
Cost1090
\[\begin{array}{l} \mathbf{if}\;y \leq -2.8803499151478406 \cdot 10^{-47}:\\ \;\;\;\;y \cdot 5 + x \cdot \left(y \cdot 2\right)\\ \mathbf{elif}\;y \leq 1.666074959418307 \cdot 10^{-58}:\\ \;\;\;\;x \cdot \left(t + z \cdot 2\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(5 + x \cdot 2\right)\\ \end{array}\]
Alternative 6
Error14.6
Cost776
\[\begin{array}{l} \mathbf{if}\;y \leq -7.074652939942878 \cdot 10^{-48} \lor \neg \left(y \leq 5.242256453401962 \cdot 10^{-60}\right):\\ \;\;\;\;y \cdot \left(5 + x \cdot 2\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(t + z \cdot 2\right)\\ \end{array}\]
Alternative 7
Error25.6
Cost1732
\[\begin{array}{l} \mathbf{if}\;y \leq -3.156228754644023 \cdot 10^{-73}:\\ \;\;\;\;y \cdot \left(5 + x \cdot 2\right)\\ \mathbf{elif}\;y \leq 1.2436910768388426 \cdot 10^{-292}:\\ \;\;\;\;x \cdot t\\ \mathbf{elif}\;y \leq 1.4440110588016492 \cdot 10^{-212}:\\ \;\;\;\;x \cdot \left(z \cdot 2\right)\\ \mathbf{elif}\;y \leq 2.1886013247462445 \cdot 10^{-58}:\\ \;\;\;\;x \cdot t\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(5 + x \cdot 2\right)\\ \end{array}\]
Alternative 8
Error31.2
Cost1476
\[\begin{array}{l} \mathbf{if}\;y \leq -2.1339530094474194 \cdot 10^{-72}:\\ \;\;\;\;y \cdot 5\\ \mathbf{elif}\;y \leq 1.5433224244440342 \cdot 10^{-292}:\\ \;\;\;\;x \cdot t\\ \mathbf{elif}\;y \leq 1.9398831917073098 \cdot 10^{-219}:\\ \;\;\;\;x \cdot \left(z \cdot 2\right)\\ \mathbf{elif}\;y \leq 1.5042309721335478 \cdot 10^{-59}:\\ \;\;\;\;x \cdot t\\ \mathbf{else}:\\ \;\;\;\;y \cdot 5\\ \end{array}\]
Alternative 9
Error31.0
Cost520
\[\begin{array}{l} \mathbf{if}\;y \leq -1.0170779819671405 \cdot 10^{-72} \lor \neg \left(y \leq 3.3867230633261987 \cdot 10^{-60}\right):\\ \;\;\;\;y \cdot 5\\ \mathbf{else}:\\ \;\;\;\;x \cdot t\\ \end{array}\]
Alternative 10
Error46.7
Cost192
\[x \cdot t\]
Alternative 11
Error61.9
Cost64
\[1\]

Error

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. Simplified0.1

    \[\leadsto \color{blue}{x \cdot \left(\left(y + z\right) \cdot 2 + t\right) + y \cdot 5}\]
  3. Using strategy rm
  4. Applied distribute-rgt-in_binary64_27560.1

    \[\leadsto \color{blue}{\left(\left(\left(y + z\right) \cdot 2\right) \cdot x + t \cdot x\right)} + y \cdot 5\]
  5. Simplified0.1

    \[\leadsto \left(\color{blue}{x \cdot \left(\left(y + z\right) \cdot 2\right)} + t \cdot x\right) + y \cdot 5\]
  6. Simplified0.1

    \[\leadsto \left(x \cdot \left(\left(y + z\right) \cdot 2\right) + \color{blue}{x \cdot t}\right) + y \cdot 5\]
  7. Simplified0.1

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

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

Reproduce

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