Average Error: 0.0 → 0.0
Time: 7.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 r2476524 = x;
        double r2476525 = 1.0;
        double r2476526 = 0.5;
        double r2476527 = r2476524 * r2476526;
        double r2476528 = r2476525 - r2476527;
        double r2476529 = r2476524 * r2476528;
        return r2476529;
}

double f(double x) {
        double r2476530 = 1.0;
        double r2476531 = x;
        double r2476532 = 0.5;
        double r2476533 = r2476531 * r2476532;
        double r2476534 = r2476530 - r2476533;
        double r2476535 = r2476534 * r2476531;
        return r2476535;
}

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