Average Error: 0.0 → 0.0
Time: 5.2s
Precision: 64
\[x \cdot \left(1.0 - x \cdot 0.5\right)\]
\[\left(1.0 - x \cdot 0.5\right) \cdot x\]
x \cdot \left(1.0 - x \cdot 0.5\right)
\left(1.0 - x \cdot 0.5\right) \cdot x
double f(double x) {
        double r2118413 = x;
        double r2118414 = 1.0;
        double r2118415 = 0.5;
        double r2118416 = r2118413 * r2118415;
        double r2118417 = r2118414 - r2118416;
        double r2118418 = r2118413 * r2118417;
        return r2118418;
}

double f(double x) {
        double r2118419 = 1.0;
        double r2118420 = x;
        double r2118421 = 0.5;
        double r2118422 = r2118420 * r2118421;
        double r2118423 = r2118419 - r2118422;
        double r2118424 = r2118423 * r2118420;
        return r2118424;
}

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 \cdot \left(1.0 - x \cdot 0.5\right)\]
  2. Final simplification0.0

    \[\leadsto \left(1.0 - x \cdot 0.5\right) \cdot x\]

Reproduce

herbie shell --seed 2019164 
(FPCore (x)
  :name "Numeric.SpecFunctions:log1p from math-functions-0.1.5.2, B"
  (* x (- 1.0 (* x 0.5))))