Average Error: 0.0 → 0.0
Time: 11.3s
Precision: 64
\[x \cdot y - x\]
\[\left(x + x \cdot y\right) \cdot \frac{x \cdot y - x}{x + x \cdot y}\]
x \cdot y - x
\left(x + x \cdot y\right) \cdot \frac{x \cdot y - x}{x + x \cdot y}
double f(double x, double y) {
        double r11318833 = x;
        double r11318834 = y;
        double r11318835 = r11318833 * r11318834;
        double r11318836 = r11318835 - r11318833;
        return r11318836;
}

double f(double x, double y) {
        double r11318837 = x;
        double r11318838 = y;
        double r11318839 = r11318837 * r11318838;
        double r11318840 = r11318837 + r11318839;
        double r11318841 = r11318839 - r11318837;
        double r11318842 = r11318841 / r11318840;
        double r11318843 = r11318840 * r11318842;
        return r11318843;
}

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.0

    \[x \cdot y - x\]
  2. Using strategy rm
  3. Applied flip--28.7

    \[\leadsto \color{blue}{\frac{\left(x \cdot y\right) \cdot \left(x \cdot y\right) - x \cdot x}{x \cdot y + x}}\]
  4. Using strategy rm
  5. Applied *-un-lft-identity28.7

    \[\leadsto \frac{\left(x \cdot y\right) \cdot \left(x \cdot y\right) - x \cdot x}{\color{blue}{1 \cdot \left(x \cdot y + x\right)}}\]
  6. Applied difference-of-squares28.7

    \[\leadsto \frac{\color{blue}{\left(x \cdot y + x\right) \cdot \left(x \cdot y - x\right)}}{1 \cdot \left(x \cdot y + x\right)}\]
  7. Applied times-frac0.0

    \[\leadsto \color{blue}{\frac{x \cdot y + x}{1} \cdot \frac{x \cdot y - x}{x \cdot y + x}}\]
  8. Simplified0.0

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

    \[\leadsto \left(x + x \cdot y\right) \cdot \frac{x \cdot y - x}{x + x \cdot y}\]

Reproduce

herbie shell --seed 2019170 
(FPCore (x y)
  :name "Data.Histogram.Bin.LogBinD:$cbinSizeN from histogram-fill-0.8.4.1"
  (- (* x y) x))