Average Error: 0.1 → 0.1
Time: 1.4s
Precision: binary64
Cost: 448
\[x - \left(y \cdot 4\right) \cdot z\]
\[x - z \cdot \left(y \cdot 4\right)\]
x - \left(y \cdot 4\right) \cdot z
x - z \cdot \left(y \cdot 4\right)
(FPCore (x y z) :precision binary64 (- x (* (* y 4.0) z)))
(FPCore (x y z) :precision binary64 (- x (* z (* y 4.0))))
double code(double x, double y, double z) {
	return x - ((y * 4.0) * z);
}
double code(double x, double y, double z) {
	return x - (z * (y * 4.0));
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Alternatives

Alternative 1
Error17.5
Cost1101
\[\begin{array}{l} \mathbf{if}\;x \leq -7.910303794654697 \cdot 10^{-141}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 3.243271138336847 \cdot 10^{-123} \lor \neg \left(x \leq 1.0569273682262665 \cdot 10^{-67}\right) \land x \leq 3.3159514938877264 \cdot 10^{-34}:\\ \;\;\;\;y \cdot \left(z \cdot -4\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array}\]
Alternative 2
Error26.6
Cost64
\[x\]
Alternative 3
Error61.8
Cost64
\[1\]

Error

Derivation

  1. Initial program 0.1

    \[x - \left(y \cdot 4\right) \cdot z\]
  2. Simplified0.1

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

    \[\leadsto x - z \cdot \left(y \cdot 4\right)\]

Reproduce

herbie shell --seed 2021044 
(FPCore (x y z)
  :name "Diagrams.Solve.Polynomial:quadForm from diagrams-solve-0.1, A"
  :precision binary64
  (- x (* (* y 4.0) z)))