Average Error: 0 → 0
Time: 591.0ms
Precision: binary64
\[2 \cdot x - 2 \cdot y\]
\[2 \cdot \left(x - y\right)\]
2 \cdot x - 2 \cdot y
2 \cdot \left(x - y\right)
double code(double x, double y) {
	return ((double) (((double) (2.0 * x)) - ((double) (2.0 * y))));
}
double code(double x, double y) {
	return ((double) (2.0 * ((double) (x - y))));
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0

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

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

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

Reproduce

herbie shell --seed 2020152 
(FPCore (x y)
  :name "(- (* 2 x) (* 2 y))"
  :precision binary64
  (- (* 2.0 x) (* 2.0 y)))