Average Error: 0.1 → 0.1
Time: 17.8s
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 r64079 = x;
        double r64080 = 1.0;
        double r64081 = y;
        double r64082 = r64079 * r64081;
        double r64083 = r64080 - r64082;
        double r64084 = r64079 * r64083;
        return r64084;
}

double f(double x, double y) {
        double r64085 = x;
        double r64086 = 1.0;
        double r64087 = y;
        double r64088 = r64085 * r64087;
        double r64089 = r64086 - r64088;
        double r64090 = r64085 * r64089;
        return r64090;
}

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