Average Error: 0.1 → 0.1
Time: 5.4s
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 r77145 = x;
        double r77146 = 1.0;
        double r77147 = y;
        double r77148 = r77145 * r77147;
        double r77149 = r77146 - r77148;
        double r77150 = r77145 * r77149;
        return r77150;
}

double f(double x, double y) {
        double r77151 = x;
        double r77152 = 1.0;
        double r77153 = y;
        double r77154 = r77151 * r77153;
        double r77155 = r77152 - r77154;
        double r77156 = r77151 * r77155;
        return r77156;
}

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