Average Error: 0 → 0
Time: 2.9s
Precision: 64
\[x \cdot 2 - y\]
\[2 \cdot x - y\]
x \cdot 2 - y
2 \cdot x - y
double f(double x, double y) {
        double r11480287 = x;
        double r11480288 = 2.0;
        double r11480289 = r11480287 * r11480288;
        double r11480290 = y;
        double r11480291 = r11480289 - r11480290;
        return r11480291;
}

double f(double x, double y) {
        double r11480292 = 2.0;
        double r11480293 = x;
        double r11480294 = r11480292 * r11480293;
        double r11480295 = y;
        double r11480296 = r11480294 - r11480295;
        return r11480296;
}

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

    \[x \cdot 2 - y\]
  2. Final simplification0

    \[\leadsto 2 \cdot x - y\]

Reproduce

herbie shell --seed 2019200 +o rules:numerics
(FPCore (x y)
  :name "Data.Colour.RGBSpace.HSL:hsl from colour-2.3.3, C"
  (- (* x 2.0) y))