Average Error: 0.1 → 0.1
Time: 10.8s
Precision: 64
\[x \cdot \left(1 - x \cdot y\right)\]
\[x \cdot 1 + \left(-y \cdot x\right) \cdot x\]
x \cdot \left(1 - x \cdot y\right)
x \cdot 1 + \left(-y \cdot x\right) \cdot x
double f(double x, double y) {
        double r2499604 = x;
        double r2499605 = 1.0;
        double r2499606 = y;
        double r2499607 = r2499604 * r2499606;
        double r2499608 = r2499605 - r2499607;
        double r2499609 = r2499604 * r2499608;
        return r2499609;
}

double f(double x, double y) {
        double r2499610 = x;
        double r2499611 = 1.0;
        double r2499612 = r2499610 * r2499611;
        double r2499613 = y;
        double r2499614 = r2499613 * r2499610;
        double r2499615 = -r2499614;
        double r2499616 = r2499615 * r2499610;
        double r2499617 = r2499612 + r2499616;
        return r2499617;
}

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. Using strategy rm
  3. Applied sub-neg0.1

    \[\leadsto x \cdot \color{blue}{\left(1 + \left(-x \cdot y\right)\right)}\]
  4. Applied distribute-lft-in0.1

    \[\leadsto \color{blue}{x \cdot 1 + x \cdot \left(-x \cdot y\right)}\]
  5. Final simplification0.1

    \[\leadsto x \cdot 1 + \left(-y \cdot x\right) \cdot x\]

Reproduce

herbie shell --seed 2019192 
(FPCore (x y)
  :name "Numeric.SpecFunctions:log1p from math-functions-0.1.5.2, A"
  (* x (- 1.0 (* x y))))