Average Error: 0.1 → 0.1
Time: 6.0s
Precision: 64
\[x \cdot \left(1 - x \cdot y\right)\]
\[x \cdot \left(1 - x \cdot y\right)\]
x \cdot \left(1 - x \cdot y\right)
x \cdot \left(1 - x \cdot y\right)
double f(double x, double y) {
        double r88790 = x;
        double r88791 = 1.0;
        double r88792 = y;
        double r88793 = r88790 * r88792;
        double r88794 = r88791 - r88793;
        double r88795 = r88790 * r88794;
        return r88795;
}

double f(double x, double y) {
        double r88796 = x;
        double r88797 = 1.0;
        double r88798 = y;
        double r88799 = r88796 * r88798;
        double r88800 = r88797 - r88799;
        double r88801 = r88796 * r88800;
        return r88801;
}

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 x \cdot \left(1 - x \cdot y\right)\]

Reproduce

herbie shell --seed 2019346 
(FPCore (x y)
  :name "Numeric.SpecFunctions:log1p from math-functions-0.1.5.2, A"
  :precision binary64
  (* x (- 1 (* x y))))