Average Error: 0.0 → 0.0
Time: 2.4s
Precision: binary64
\[x - \frac{y}{200} \]
\[x - \frac{y}{200} \]
x - \frac{y}{200}
x - \frac{y}{200}
(FPCore (x y) :precision binary64 (- x (/ y 200.0)))
(FPCore (x y) :precision binary64 (- x (/ y 200.0)))
double code(double x, double y) {
	return x - (y / 200.0);
}
double code(double x, double y) {
	return x - (y / 200.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.0

    \[x - \frac{y}{200} \]
  2. Applied add-sqr-sqrt_binary640.4

    \[\leadsto x - \frac{y}{\color{blue}{\sqrt{200} \cdot \sqrt{200}}} \]
  3. Applied *-un-lft-identity_binary640.4

    \[\leadsto x - \frac{\color{blue}{1 \cdot y}}{\sqrt{200} \cdot \sqrt{200}} \]
  4. Applied times-frac_binary640.2

    \[\leadsto x - \color{blue}{\frac{1}{\sqrt{200}} \cdot \frac{y}{\sqrt{200}}} \]
  5. Applied cancel-sign-sub-inv_binary640.2

    \[\leadsto \color{blue}{x + \left(-\frac{1}{\sqrt{200}}\right) \cdot \frac{y}{\sqrt{200}}} \]
  6. Applied *-un-lft-identity_binary640.2

    \[\leadsto x + \left(-\frac{1}{\sqrt{\color{blue}{1 \cdot 200}}}\right) \cdot \frac{y}{\sqrt{200}} \]
  7. Applied sqrt-prod_binary640.2

    \[\leadsto x + \left(-\frac{1}{\color{blue}{\sqrt{1} \cdot \sqrt{200}}}\right) \cdot \frac{y}{\sqrt{200}} \]
  8. Applied *-un-lft-identity_binary640.2

    \[\leadsto x + \left(-\frac{\color{blue}{1 \cdot 1}}{\sqrt{1} \cdot \sqrt{200}}\right) \cdot \frac{y}{\sqrt{200}} \]
  9. Applied times-frac_binary640.2

    \[\leadsto x + \left(-\color{blue}{\frac{1}{\sqrt{1}} \cdot \frac{1}{\sqrt{200}}}\right) \cdot \frac{y}{\sqrt{200}} \]
  10. Applied distribute-lft-neg-in_binary640.2

    \[\leadsto x + \color{blue}{\left(\left(-\frac{1}{\sqrt{1}}\right) \cdot \frac{1}{\sqrt{200}}\right)} \cdot \frac{y}{\sqrt{200}} \]
  11. Applied associate-*l*_binary640.2

    \[\leadsto x + \color{blue}{\left(-\frac{1}{\sqrt{1}}\right) \cdot \left(\frac{1}{\sqrt{200}} \cdot \frac{y}{\sqrt{200}}\right)} \]
  12. Simplified0.0

    \[\leadsto x + \left(-\frac{1}{\sqrt{1}}\right) \cdot \color{blue}{\frac{y}{200}} \]
  13. Final simplification0.0

    \[\leadsto x - \frac{y}{200} \]

Reproduce

herbie shell --seed 2022077 
(FPCore (x y)
  :name "Data.Colour.CIE:cieLAB from colour-2.3.3, D"
  :precision binary64
  (- x (/ y 200.0)))