Average Error: 0.1 → 0.1
Time: 17.7s
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 r70557 = x;
        double r70558 = 1.0;
        double r70559 = y;
        double r70560 = r70557 * r70559;
        double r70561 = r70558 - r70560;
        double r70562 = r70557 * r70561;
        return r70562;
}

double f(double x, double y) {
        double r70563 = x;
        double r70564 = 1.0;
        double r70565 = y;
        double r70566 = r70563 * r70565;
        double r70567 = r70564 - r70566;
        double r70568 = r70563 * r70567;
        return r70568;
}

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