Average Error: 0.0 → 0.0
Time: 498.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 r41104 = x;
        double r41105 = 1.0;
        double r41106 = 0.5;
        double r41107 = r41104 * r41106;
        double r41108 = r41105 - r41107;
        double r41109 = r41104 * r41108;
        return r41109;
}

double f(double x) {
        double r41110 = x;
        double r41111 = 1.0;
        double r41112 = 0.5;
        double r41113 = r41110 * r41112;
        double r41114 = r41111 - r41113;
        double r41115 = r41110 * r41114;
        return r41115;
}

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