Average Error: 0.0 → 0.0
Time: 887.0ms
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 r50127 = x;
        double r50128 = 1.0;
        double r50129 = 0.5;
        double r50130 = r50127 * r50129;
        double r50131 = r50128 - r50130;
        double r50132 = r50127 * r50131;
        return r50132;
}

double f(double x) {
        double r50133 = x;
        double r50134 = 1.0;
        double r50135 = 0.5;
        double r50136 = r50133 * r50135;
        double r50137 = r50134 - r50136;
        double r50138 = r50133 * r50137;
        return r50138;
}

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