Average Error: 0.1 → 0.1
Time: 8.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 r59103 = x;
        double r59104 = 1.0;
        double r59105 = y;
        double r59106 = r59103 * r59105;
        double r59107 = r59104 - r59106;
        double r59108 = r59103 * r59107;
        return r59108;
}

double f(double x, double y) {
        double r59109 = x;
        double r59110 = 1.0;
        double r59111 = y;
        double r59112 = r59109 * r59111;
        double r59113 = r59110 - r59112;
        double r59114 = r59109 * r59113;
        return r59114;
}

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