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 r3573488 = x;
        double r3573489 = 1.0;
        double r3573490 = 0.5;
        double r3573491 = r3573488 * r3573490;
        double r3573492 = r3573489 - r3573491;
        double r3573493 = r3573488 * r3573492;
        return r3573493;
}

double f(double x) {
        double r3573494 = 1.0;
        double r3573495 = x;
        double r3573496 = 0.5;
        double r3573497 = r3573495 * r3573496;
        double r3573498 = r3573494 - r3573497;
        double r3573499 = r3573498 * r3573495;
        return r3573499;
}

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