Average Error: 0.0 → 0.0
Time: 4.8s
Precision: 64
\[x \cdot \left(1 - x \cdot 0.5\right)\]
\[\left(1 - x \cdot 0.5\right) \cdot x\]
x \cdot \left(1 - x \cdot 0.5\right)
\left(1 - x \cdot 0.5\right) \cdot x
double f(double x) {
        double r38454 = x;
        double r38455 = 1.0;
        double r38456 = 0.5;
        double r38457 = r38454 * r38456;
        double r38458 = r38455 - r38457;
        double r38459 = r38454 * r38458;
        return r38459;
}

double f(double x) {
        double r38460 = 1.0;
        double r38461 = x;
        double r38462 = 0.5;
        double r38463 = r38461 * r38462;
        double r38464 = r38460 - r38463;
        double r38465 = r38464 * r38461;
        return r38465;
}

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

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

Reproduce

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