Average Error: 0.1 → 0.1
Time: 14.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 r68157 = x;
        double r68158 = 1.0;
        double r68159 = y;
        double r68160 = r68157 * r68159;
        double r68161 = r68158 - r68160;
        double r68162 = r68157 * r68161;
        return r68162;
}

double f(double x, double y) {
        double r68163 = x;
        double r68164 = 1.0;
        double r68165 = y;
        double r68166 = r68163 * r68165;
        double r68167 = r68164 - r68166;
        double r68168 = r68163 * r68167;
        return r68168;
}

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