Average Error: 0.0 → 0.0
Time: 3.0s
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 r23441 = x;
        double r23442 = 1.0;
        double r23443 = 0.5;
        double r23444 = r23441 * r23443;
        double r23445 = r23442 - r23444;
        double r23446 = r23441 * r23445;
        return r23446;
}

double f(double x) {
        double r23447 = 1.0;
        double r23448 = x;
        double r23449 = 0.5;
        double r23450 = r23448 * r23449;
        double r23451 = r23447 - r23450;
        double r23452 = r23451 * r23448;
        return r23452;
}

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