Average Error: 0.1 → 0.1
Time: 16.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 r55114 = x;
        double r55115 = 1.0;
        double r55116 = y;
        double r55117 = r55114 * r55116;
        double r55118 = r55115 - r55117;
        double r55119 = r55114 * r55118;
        return r55119;
}

double f(double x, double y) {
        double r55120 = x;
        double r55121 = 1.0;
        double r55122 = y;
        double r55123 = r55120 * r55122;
        double r55124 = r55121 - r55123;
        double r55125 = r55120 * r55124;
        return r55125;
}

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