Average Error: 0.1 → 0.1
Time: 42.3s
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 r3538995 = x;
        double r3538996 = 1.0;
        double r3538997 = y;
        double r3538998 = r3538995 * r3538997;
        double r3538999 = r3538996 - r3538998;
        double r3539000 = r3538995 * r3538999;
        return r3539000;
}

double f(double x, double y) {
        double r3539001 = 1.0;
        double r3539002 = x;
        double r3539003 = y;
        double r3539004 = r3539002 * r3539003;
        double r3539005 = r3539001 - r3539004;
        double r3539006 = r3539005 * r3539002;
        return r3539006;
}

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))))