Average Error: 0.0 → 0.0
Time: 6.6s
Precision: 64
\[200 \cdot \left(x - y\right)\]
\[x \cdot 200 + \left(-y\right) \cdot 200\]
200 \cdot \left(x - y\right)
x \cdot 200 + \left(-y\right) \cdot 200
double f(double x, double y) {
        double r214920 = 200.0;
        double r214921 = x;
        double r214922 = y;
        double r214923 = r214921 - r214922;
        double r214924 = r214920 * r214923;
        return r214924;
}

double f(double x, double y) {
        double r214925 = x;
        double r214926 = 200.0;
        double r214927 = r214925 * r214926;
        double r214928 = y;
        double r214929 = -r214928;
        double r214930 = r214929 * r214926;
        double r214931 = r214927 + r214930;
        return r214931;
}

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. Using strategy rm
  3. Applied sub-neg0.0

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

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

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

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

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

Reproduce

herbie shell --seed 2020045 +o rules:numerics
(FPCore (x y)
  :name "Data.Colour.CIE:cieLABView from colour-2.3.3, C"
  :precision binary64
  (* 200 (- x y)))