Average Error: 0.0 → 0.0
Time: 4.8s
Precision: 64
\[x \cdot \left(1 - x \cdot 0.5\right)\]
\[x \cdot \left(1 - 0.5 \cdot x\right)\]
x \cdot \left(1 - x \cdot 0.5\right)
x \cdot \left(1 - 0.5 \cdot x\right)
double f(double x) {
        double r47069 = x;
        double r47070 = 1.0;
        double r47071 = 0.5;
        double r47072 = r47069 * r47071;
        double r47073 = r47070 - r47072;
        double r47074 = r47069 * r47073;
        return r47074;
}

double f(double x) {
        double r47075 = x;
        double r47076 = 1.0;
        double r47077 = 0.5;
        double r47078 = r47077 * r47075;
        double r47079 = r47076 - r47078;
        double r47080 = r47075 * r47079;
        return r47080;
}

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. Simplified0.0

    \[\leadsto \color{blue}{\left(1 - x \cdot 0.5\right) \cdot x}\]
  3. Final simplification0.0

    \[\leadsto x \cdot \left(1 - 0.5 \cdot x\right)\]

Reproduce

herbie shell --seed 2019194 
(FPCore (x)
  :name "Numeric.SpecFunctions:log1p from math-functions-0.1.5.2, B"
  (* x (- 1.0 (* x 0.5))))