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 r57946 = x;
        double r57947 = 1.0;
        double r57948 = 0.5;
        double r57949 = r57946 * r57948;
        double r57950 = r57947 - r57949;
        double r57951 = r57946 * r57950;
        return r57951;
}

double f(double x) {
        double r57952 = x;
        double r57953 = 1.0;
        double r57954 = 0.5;
        double r57955 = r57952 * r57954;
        double r57956 = r57953 - r57955;
        double r57957 = r57952 * r57956;
        return r57957;
}

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