Average Error: 0.0 → 0.0
Time: 2.5s
Precision: 64
\[x - 2 \cdot x\]
\[x - 2 \cdot x\]
x - 2 \cdot x
x - 2 \cdot x
double f(double x) {
        double r63339 = x;
        double r63340 = 2.0;
        double r63341 = r63340 * r63339;
        double r63342 = r63339 - r63341;
        return r63342;
}

double f(double x) {
        double r63343 = x;
        double r63344 = 2.0;
        double r63345 = r63344 * r63343;
        double r63346 = r63343 - r63345;
        return r63346;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.0

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

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

Reproduce

herbie shell --seed 1 
(FPCore (x)
  :name "x-2*x"
  (- x (* 2.0 x)))