Average Error: 0.1 → 0.1
Time: 3.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 r46286 = x;
        double r46287 = 1.0;
        double r46288 = y;
        double r46289 = r46286 * r46288;
        double r46290 = r46287 - r46289;
        double r46291 = r46286 * r46290;
        return r46291;
}

double f(double x, double y) {
        double r46292 = x;
        double r46293 = 1.0;
        double r46294 = y;
        double r46295 = r46292 * r46294;
        double r46296 = r46293 - r46295;
        double r46297 = r46292 * r46296;
        return r46297;
}

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