Average Error: 0 → 0
Time: 1.0s
Precision: 64
\[x \cdot 2 - y\]
\[x \cdot 2 - y\]
x \cdot 2 - y
x \cdot 2 - y
double f(double x, double y) {
        double r10386023 = x;
        double r10386024 = 2.0;
        double r10386025 = r10386023 * r10386024;
        double r10386026 = y;
        double r10386027 = r10386025 - r10386026;
        return r10386027;
}

double f(double x, double y) {
        double r10386028 = x;
        double r10386029 = 2.0;
        double r10386030 = r10386028 * r10386029;
        double r10386031 = y;
        double r10386032 = r10386030 - r10386031;
        return r10386032;
}

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 x \cdot 2 - y\]

Reproduce

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