Average Error: 0.0 → 0.0
Time: 14.4s
Precision: 64
\[500 \cdot \left(x - y\right)\]
\[500 \cdot \left(-y\right) + x \cdot 500\]
500 \cdot \left(x - y\right)
500 \cdot \left(-y\right) + x \cdot 500
double f(double x, double y) {
        double r16766270 = 500.0;
        double r16766271 = x;
        double r16766272 = y;
        double r16766273 = r16766271 - r16766272;
        double r16766274 = r16766270 * r16766273;
        return r16766274;
}

double f(double x, double y) {
        double r16766275 = 500.0;
        double r16766276 = y;
        double r16766277 = -r16766276;
        double r16766278 = r16766275 * r16766277;
        double r16766279 = x;
        double r16766280 = r16766279 * r16766275;
        double r16766281 = r16766278 + r16766280;
        return r16766281;
}

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

    \[500 \cdot \left(x - y\right)\]
  2. Using strategy rm
  3. Applied sub-neg0.0

    \[\leadsto 500 \cdot \color{blue}{\left(x + \left(-y\right)\right)}\]
  4. Applied distribute-rgt-in0.0

    \[\leadsto \color{blue}{x \cdot 500 + \left(-y\right) \cdot 500}\]
  5. Final simplification0.0

    \[\leadsto 500 \cdot \left(-y\right) + x \cdot 500\]

Reproduce

herbie shell --seed 2019172 
(FPCore (x y)
  :name "Data.Colour.CIE:cieLABView from colour-2.3.3, B"
  (* 500.0 (- x y)))