Average Error: 0.0 → 0.0
Time: 985.0ms
Precision: 64
\[x \cdot \left(1 - x \cdot 0.5\right)\]
\[\left(1 - x \cdot 0.5\right) \cdot x\]
x \cdot \left(1 - x \cdot 0.5\right)
\left(1 - x \cdot 0.5\right) \cdot x
double f(double x) {
        double r3124026 = x;
        double r3124027 = 1.0;
        double r3124028 = 0.5;
        double r3124029 = r3124026 * r3124028;
        double r3124030 = r3124027 - r3124029;
        double r3124031 = r3124026 * r3124030;
        return r3124031;
}

double f(double x) {
        double r3124032 = 1.0;
        double r3124033 = x;
        double r3124034 = 0.5;
        double r3124035 = r3124033 * r3124034;
        double r3124036 = r3124032 - r3124035;
        double r3124037 = r3124036 * r3124033;
        return r3124037;
}

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 \left(1 - x \cdot 0.5\right) \cdot x\]

Reproduce

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