Average Error: 0.0 → 0.0
Time: 1.1s
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 r33762 = x;
        double r33763 = 1.0;
        double r33764 = 0.5;
        double r33765 = r33762 * r33764;
        double r33766 = r33763 - r33765;
        double r33767 = r33762 * r33766;
        return r33767;
}

double f(double x) {
        double r33768 = x;
        double r33769 = 1.0;
        double r33770 = 0.5;
        double r33771 = r33768 * r33770;
        double r33772 = r33769 - r33771;
        double r33773 = r33768 * r33772;
        return r33773;
}

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