Average Error: 0.0 → 0.0
Time: 12.2s
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 r16414836 = 200.0;
        double r16414837 = x;
        double r16414838 = y;
        double r16414839 = r16414837 - r16414838;
        double r16414840 = r16414836 * r16414839;
        return r16414840;
}

double f(double x, double y) {
        double r16414841 = x;
        double r16414842 = 200.0;
        double r16414843 = r16414841 * r16414842;
        double r16414844 = y;
        double r16414845 = -r16414844;
        double r16414846 = r16414845 * r16414842;
        double r16414847 = r16414843 + r16414846;
        return r16414847;
}

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

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

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

Reproduce

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