Average Error: 0.0 → 0.0
Time: 5.2s
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 r2878156 = x;
        double r2878157 = 1.0;
        double r2878158 = 0.5;
        double r2878159 = r2878156 * r2878158;
        double r2878160 = r2878157 - r2878159;
        double r2878161 = r2878156 * r2878160;
        return r2878161;
}

double f(double x) {
        double r2878162 = 1.0;
        double r2878163 = x;
        double r2878164 = 0.5;
        double r2878165 = r2878163 * r2878164;
        double r2878166 = r2878162 - r2878165;
        double r2878167 = r2878166 * r2878163;
        return r2878167;
}

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