Average Error: 0.0 → 0.0
Time: 3.4s
Precision: binary64
\[x \cdot y - x\]
\[x \cdot \frac{x \cdot y - x}{x}\]
x \cdot y - x
x \cdot \frac{x \cdot y - x}{x}
double code(double x, double y) {
	return ((double) (((double) (x * y)) - x));
}
double code(double x, double y) {
	return ((double) (x * ((double) (((double) (((double) (x * y)) - x)) / x))));
}

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 flip3--40.3

    \[\leadsto \color{blue}{\frac{{\left(x \cdot y\right)}^{3} - {x}^{3}}{\left(x \cdot y\right) \cdot \left(x \cdot y\right) + \left(x \cdot x + \left(x \cdot y\right) \cdot x\right)}}\]
  4. Simplified45.1

    \[\leadsto \frac{{\left(x \cdot y\right)}^{3} - {x}^{3}}{\color{blue}{\left(x \cdot \left(y \cdot y + \left(y + 1\right)\right)\right) \cdot x}}\]
  5. Using strategy rm
  6. Applied difference-cubes45.1

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

    \[\leadsto \color{blue}{\frac{\left(x \cdot y\right) \cdot \left(x \cdot y\right) + \left(x \cdot x + \left(x \cdot y\right) \cdot x\right)}{x \cdot \left(y \cdot y + \left(y + 1\right)\right)} \cdot \frac{x \cdot y - x}{x}}\]
  8. Simplified35.2

    \[\leadsto \color{blue}{\frac{\frac{\left(x \cdot \left(y \cdot y + \left(y + 1\right)\right)\right) \cdot x}{x}}{y \cdot y + \left(y + 1\right)}} \cdot \frac{x \cdot y - x}{x}\]
  9. Taylor expanded around 0 0.0

    \[\leadsto \color{blue}{x} \cdot \frac{x \cdot y - x}{x}\]
  10. Final simplification0.0

    \[\leadsto x \cdot \frac{x \cdot y - x}{x}\]

Reproduce

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