Average Error: 0.0 → 0.0
Time: 1.7s
Precision: binary64
\[200 \cdot \left(x - y\right) \]
\[200 \cdot x + y \cdot -200 \]
200 \cdot \left(x - y\right)
200 \cdot x + y \cdot -200
(FPCore (x y) :precision binary64 (* 200.0 (- x y)))
(FPCore (x y) :precision binary64 (+ (* 200.0 x) (* y -200.0)))
double code(double x, double y) {
	return 200.0 * (x - y);
}
double code(double x, double y) {
	return (200.0 * 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

    \[200 \cdot \left(x - y\right) \]
  2. Applied add-sqr-sqrt_binary640.9

    \[\leadsto \color{blue}{\left(\sqrt{200} \cdot \sqrt{200}\right)} \cdot \left(x - y\right) \]
  3. Applied associate-*l*_binary640.5

    \[\leadsto \color{blue}{\sqrt{200} \cdot \left(\sqrt{200} \cdot \left(x - y\right)\right)} \]
  4. Applied sub-neg_binary640.5

    \[\leadsto \sqrt{200} \cdot \left(\sqrt{200} \cdot \color{blue}{\left(x + \left(-y\right)\right)}\right) \]
  5. Applied distribute-rgt-in_binary640.5

    \[\leadsto \sqrt{200} \cdot \color{blue}{\left(x \cdot \sqrt{200} + \left(-y\right) \cdot \sqrt{200}\right)} \]
  6. Applied distribute-rgt-in_binary640.5

    \[\leadsto \color{blue}{\left(x \cdot \sqrt{200}\right) \cdot \sqrt{200} + \left(\left(-y\right) \cdot \sqrt{200}\right) \cdot \sqrt{200}} \]
  7. Simplified0.3

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

    \[\leadsto 200 \cdot x + \color{blue}{y \cdot -200} \]
  9. Final simplification0.0

    \[\leadsto 200 \cdot x + y \cdot -200 \]

Reproduce

herbie shell --seed 2022067 
(FPCore (x y)
  :name "Data.Colour.CIE:cieLABView from colour-2.3.3, C"
  :precision binary64
  (* 200.0 (- x y)))