Average Error: 0.1 → 0.1
Time: 10.8s
Precision: 64
\[x \cdot \left(1 - x \cdot y\right)\]
\[\left(1 - x \cdot y\right) \cdot x\]
x \cdot \left(1 - x \cdot y\right)
\left(1 - x \cdot y\right) \cdot x
double f(double x, double y) {
        double r56085 = x;
        double r56086 = 1.0;
        double r56087 = y;
        double r56088 = r56085 * r56087;
        double r56089 = r56086 - r56088;
        double r56090 = r56085 * r56089;
        return r56090;
}

double f(double x, double y) {
        double r56091 = 1.0;
        double r56092 = x;
        double r56093 = y;
        double r56094 = r56092 * r56093;
        double r56095 = r56091 - r56094;
        double r56096 = r56095 * r56092;
        return r56096;
}

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 - x \cdot y\right)\]
  2. Final simplification0.1

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

Reproduce

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