Average Error: 0.0 → 0.0
Time: 993.0ms
Precision: binary64
Cost: 320
\[x + \frac{y}{500}\]
\[x + \frac{y}{500}\]
x + \frac{y}{500}
x + \frac{y}{500}
(FPCore (x y) :precision binary64 (+ x (/ y 500.0)))
(FPCore (x y) :precision binary64 (+ x (/ y 500.0)))
double code(double x, double y) {
	return x + (y / 500.0);
}
double code(double x, double y) {
	return x + (y / 500.0);
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Alternatives

Alternative 1
Error16.3
Cost1297
\[\begin{array}{l} \mathbf{if}\;\frac{y}{500} \leq -1.635995477952922 \cdot 10^{+45} \lor \neg \left(\frac{y}{500} \leq -8.604458174217365 \cdot 10^{+16} \lor \neg \left(\frac{y}{500} \leq -1.1449875403847974 \cdot 10^{-42}\right) \land \frac{y}{500} \leq 2.969118917831626 \cdot 10^{-14}\right):\\ \;\;\;\;\frac{y}{500}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array}\]
Alternative 2
Error31.5
Cost64
\[x\]
Alternative 3
Error61.9
Cost64
\[-1\]
Alternative 4
Error61.9
Cost64
\[1\]

Error

Derivation

  1. Initial program 0.0

    \[x + \frac{y}{500}\]
  2. Simplified0.0

    \[\leadsto \color{blue}{x + \frac{y}{500}}\]
  3. Final simplification0.0

    \[\leadsto x + \frac{y}{500}\]

Reproduce

herbie shell --seed 2021044 
(FPCore (x y)
  :name "Data.Colour.CIE:cieLAB from colour-2.3.3, C"
  :precision binary64
  (+ x (/ y 500.0)))