Average Error: 0.0 → 0.0
Time: 638.0ms
Precision: 64
\[500 \cdot \left(x - y\right)\]
\[500 \cdot x + 500 \cdot \left(-y\right)\]
500 \cdot \left(x - y\right)
500 \cdot x + 500 \cdot \left(-y\right)
double f(double x, double y) {
        double r248501 = 500.0;
        double r248502 = x;
        double r248503 = y;
        double r248504 = r248502 - r248503;
        double r248505 = r248501 * r248504;
        return r248505;
}

double f(double x, double y) {
        double r248506 = 500.0;
        double r248507 = x;
        double r248508 = r248506 * r248507;
        double r248509 = y;
        double r248510 = -r248509;
        double r248511 = r248506 * r248510;
        double r248512 = r248508 + r248511;
        return r248512;
}

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-lft-in0.0

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

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

Reproduce

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