Average Error: 0.1 → 0.1
Time: 14.1s
Precision: 64
\[x \cdot \left(1.0 - x \cdot y\right)\]
\[\left(1.0 - x \cdot y\right) \cdot x\]
x \cdot \left(1.0 - x \cdot y\right)
\left(1.0 - x \cdot y\right) \cdot x
double f(double x, double y) {
        double r3531308 = x;
        double r3531309 = 1.0;
        double r3531310 = y;
        double r3531311 = r3531308 * r3531310;
        double r3531312 = r3531309 - r3531311;
        double r3531313 = r3531308 * r3531312;
        return r3531313;
}

double f(double x, double y) {
        double r3531314 = 1.0;
        double r3531315 = x;
        double r3531316 = y;
        double r3531317 = r3531315 * r3531316;
        double r3531318 = r3531314 - r3531317;
        double r3531319 = r3531318 * r3531315;
        return r3531319;
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.1

    \[x \cdot \left(1.0 - x \cdot y\right)\]
  2. Final simplification0.1

    \[\leadsto \left(1.0 - x \cdot y\right) \cdot x\]

Reproduce

herbie shell --seed 2019165 
(FPCore (x y)
  :name "Numeric.SpecFunctions:log1p from math-functions-0.1.5.2, A"
  (* x (- 1.0 (* x y))))