Average Error: 0.1 → 0.1
Time: 16.9s
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 r68376 = x;
        double r68377 = 1.0;
        double r68378 = y;
        double r68379 = r68376 * r68378;
        double r68380 = r68377 - r68379;
        double r68381 = r68376 * r68380;
        return r68381;
}

double f(double x, double y) {
        double r68382 = x;
        double r68383 = 1.0;
        double r68384 = y;
        double r68385 = r68382 * r68384;
        double r68386 = r68383 - r68385;
        double r68387 = r68382 * r68386;
        return r68387;
}

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