Average Error: 0.1 → 0.1
Time: 12.9s
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 r1235285 = x;
        double r1235286 = 1.0;
        double r1235287 = y;
        double r1235288 = r1235285 * r1235287;
        double r1235289 = r1235286 - r1235288;
        double r1235290 = r1235285 * r1235289;
        return r1235290;
}

double f(double x, double y) {
        double r1235291 = 1.0;
        double r1235292 = x;
        double r1235293 = y;
        double r1235294 = r1235292 * r1235293;
        double r1235295 = r1235291 - r1235294;
        double r1235296 = r1235295 * r1235292;
        return r1235296;
}

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 2019156 
(FPCore (x y)
  :name "Numeric.SpecFunctions:log1p from math-functions-0.1.5.2, A"
  (* x (- 1.0 (* x y))))