Average Error: 0.0 → 0.0
Time: 8.7s
Precision: 64
\[x \cdot \left(1 - x \cdot 0.5\right)\]
\[x \cdot \left(1 - x \cdot 0.5\right)\]
x \cdot \left(1 - x \cdot 0.5\right)
x \cdot \left(1 - x \cdot 0.5\right)
double f(double x) {
        double r31838 = x;
        double r31839 = 1.0;
        double r31840 = 0.5;
        double r31841 = r31838 * r31840;
        double r31842 = r31839 - r31841;
        double r31843 = r31838 * r31842;
        return r31843;
}

double f(double x) {
        double r31844 = x;
        double r31845 = 1.0;
        double r31846 = 0.5;
        double r31847 = r31844 * r31846;
        double r31848 = r31845 - r31847;
        double r31849 = r31844 * r31848;
        return r31849;
}

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 x \cdot \left(1 - x \cdot 0.5\right)\]

Reproduce

herbie shell --seed 2019322 +o rules:numerics
(FPCore (x)
  :name "Numeric.SpecFunctions:log1p from math-functions-0.1.5.2, B"
  :precision binary64
  (* x (- 1 (* x 0.5))))