Average Error: 0.0 → 0.0
Time: 19.6s
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 r3430059 = x;
        double r3430060 = 1.0;
        double r3430061 = 0.5;
        double r3430062 = r3430059 * r3430061;
        double r3430063 = r3430060 - r3430062;
        double r3430064 = r3430059 * r3430063;
        return r3430064;
}

double f(double x) {
        double r3430065 = 1.0;
        double r3430066 = x;
        double r3430067 = 0.5;
        double r3430068 = r3430066 * r3430067;
        double r3430069 = r3430065 - r3430068;
        double r3430070 = r3430069 * r3430066;
        return r3430070;
}

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