Average Error: 0.0 → 0.0
Time: 5.5s
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 r43915 = x;
        double r43916 = 1.0;
        double r43917 = 0.5;
        double r43918 = r43915 * r43917;
        double r43919 = r43916 - r43918;
        double r43920 = r43915 * r43919;
        return r43920;
}

double f(double x) {
        double r43921 = 1.0;
        double r43922 = x;
        double r43923 = 0.5;
        double r43924 = r43922 * r43923;
        double r43925 = r43921 - r43924;
        double r43926 = r43925 * r43922;
        return r43926;
}

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