Average Error: 0.0 → 0.0
Time: 6.0s
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 r2725302 = x;
        double r2725303 = 1.0;
        double r2725304 = 0.5;
        double r2725305 = r2725302 * r2725304;
        double r2725306 = r2725303 - r2725305;
        double r2725307 = r2725302 * r2725306;
        return r2725307;
}

double f(double x) {
        double r2725308 = 1.0;
        double r2725309 = x;
        double r2725310 = 0.5;
        double r2725311 = r2725309 * r2725310;
        double r2725312 = r2725308 - r2725311;
        double r2725313 = r2725312 * r2725309;
        return r2725313;
}

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 2019163 
(FPCore (x)
  :name "Numeric.SpecFunctions:log1p from math-functions-0.1.5.2, B"
  (* x (- 1.0 (* x 0.5))))