Average Error: 0.0 → 0.0
Time: 5.7s
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 r3536339 = x;
        double r3536340 = 1.0;
        double r3536341 = 0.5;
        double r3536342 = r3536339 * r3536341;
        double r3536343 = r3536340 - r3536342;
        double r3536344 = r3536339 * r3536343;
        return r3536344;
}

double f(double x) {
        double r3536345 = 1.0;
        double r3536346 = x;
        double r3536347 = 0.5;
        double r3536348 = r3536346 * r3536347;
        double r3536349 = r3536345 - r3536348;
        double r3536350 = r3536349 * r3536346;
        return r3536350;
}

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