Average Error: 0.1 → 0.1
Time: 19.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 r3793807 = x;
        double r3793808 = 1.0;
        double r3793809 = y;
        double r3793810 = r3793807 * r3793809;
        double r3793811 = r3793808 - r3793810;
        double r3793812 = r3793807 * r3793811;
        return r3793812;
}

double f(double x, double y) {
        double r3793813 = 1.0;
        double r3793814 = x;
        double r3793815 = y;
        double r3793816 = r3793814 * r3793815;
        double r3793817 = r3793813 - r3793816;
        double r3793818 = r3793817 * r3793814;
        return r3793818;
}

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