Average Error: 0.0 → 0.0
Time: 5.7s
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 r4116191 = x;
        double r4116192 = 1.0;
        double r4116193 = 0.5;
        double r4116194 = r4116191 * r4116193;
        double r4116195 = r4116192 - r4116194;
        double r4116196 = r4116191 * r4116195;
        return r4116196;
}

double f(double x) {
        double r4116197 = 1.0;
        double r4116198 = x;
        double r4116199 = 0.5;
        double r4116200 = r4116198 * r4116199;
        double r4116201 = r4116197 - r4116200;
        double r4116202 = r4116201 * r4116198;
        return r4116202;
}

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))))