Average Error: 0.4 → 0.4
Time: 777.0ms
Precision: binary64
\[\frac{x - y}{5 \cdot \left(x - 2\right) + 3 \cdot \left(y - 5\right)}\]
\[\frac{x - y}{5 \cdot \left(x - 2\right) + 3 \cdot \left(y - 5\right)}\]
\frac{x - y}{5 \cdot \left(x - 2\right) + 3 \cdot \left(y - 5\right)}
\frac{x - y}{5 \cdot \left(x - 2\right) + 3 \cdot \left(y - 5\right)}
double code(double x, double y) {
	return ((double) (((double) (x - y)) / ((double) (((double) (5.0 * ((double) (x - 2.0)))) + ((double) (3.0 * ((double) (y - 5.0))))))));
}
double code(double x, double y) {
	return ((double) (((double) (x - y)) / ((double) (((double) (5.0 * ((double) (x - 2.0)))) + ((double) (3.0 * ((double) (y - 5.0))))))));
}

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.4

    \[\frac{x - y}{5 \cdot \left(x - 2\right) + 3 \cdot \left(y - 5\right)}\]
  2. Final simplification0.4

    \[\leadsto \frac{x - y}{5 \cdot \left(x - 2\right) + 3 \cdot \left(y - 5\right)}\]

Reproduce

herbie shell --seed 2020153 
(FPCore (x y)
  :name "(/ (- x y) (+ (* 5 (- x 2)) (* 3 (- y 5))))"
  :precision binary64
  (/ (- x y) (+ (* 5.0 (- x 2.0)) (* 3.0 (- y 5.0)))))