Average Error: 0.2 → 0.2
Time: 640.0ms
Precision: binary64
\[\frac{2 \cdot 10^{3} \cdot x}{y} - 50\]
\[\frac{2 \cdot 10^{3} \cdot x}{y} - 50\]
\frac{2 \cdot 10^{3} \cdot x}{y} - 50
\frac{2 \cdot 10^{3} \cdot x}{y} - 50
double code(double x, double y) {
	return ((double) (((double) (((double) (2000.0 * x)) / y)) - 50.0));
}
double code(double x, double y) {
	return ((double) (((double) (((double) (2000.0 * x)) / y)) - 50.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.2

    \[\frac{2 \cdot 10^{3} \cdot x}{y} - 50\]
  2. Final simplification0.2

    \[\leadsto \frac{2 \cdot 10^{3} \cdot x}{y} - 50\]

Reproduce

herbie shell --seed 2020153 
(FPCore (x y)
  :name "(- (/ (* 2000 x) y) 50)"
  :precision binary64
  (- (/ (* 2000.0 x) y) 50.0))