Average Error: 0.0 → 0.0
Time: 1.3s
Precision: binary64
Cost: 320
\[x - y \cdot z\]
\[x - y \cdot z\]
x - y \cdot z
x - y \cdot z
(FPCore (x y z) :precision binary64 (- x (* y z)))
(FPCore (x y z) :precision binary64 (- x (* y z)))
double code(double x, double y, double z) {
	return x - (y * z);
}
double code(double x, double y, double z) {
	return x - (y * z);
}

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

Target

Original0.0
Target0.0
Herbie0.0
\[\frac{x + y \cdot z}{\frac{x + y \cdot z}{x - y \cdot z}}\]

Alternatives

Alternative 1
Error16.4
Cost1361
\[\begin{array}{l} \mathbf{if}\;y \cdot z \leq -3.083152062932669 \cdot 10^{+41} \lor \neg \left(y \cdot z \leq -1.8820309207719416 \cdot 10^{-66} \lor \neg \left(y \cdot z \leq -3.595069731681303 \cdot 10^{-112}\right) \land y \cdot z \leq 3.7694334477325635 \cdot 10^{-62}\right):\\ \;\;\;\;-y \cdot z\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array}\]
Alternative 2
Error26.6
Cost64
\[x\]
Alternative 3
Error61.8
Cost64
\[1\]

Error

Derivation

  1. Initial program 0.0

    \[x - y \cdot z\]
  2. Simplified0.0

    \[\leadsto \color{blue}{x - y \cdot z}\]
  3. Final simplification0.0

    \[\leadsto x - y \cdot z\]

Reproduce

herbie shell --seed 2021044 
(FPCore (x y z)
  :name "Diagrams.Solve.Tridiagonal:solveTriDiagonal from diagrams-solve-0.1, C"
  :precision binary64

  :herbie-target
  (/ (+ x (* y z)) (/ (+ x (* y z)) (- x (* y z))))

  (- x (* y z)))