Average Error: 0.0 → 0.0
Time: 681.0ms
Precision: binary64
\[x \cdot x - \frac{x}{x}\]
\[x \cdot x + -1\]
x \cdot x - \frac{x}{x}
x \cdot x + -1
double code(double x) {
	return ((double) (((double) (x * x)) - ((double) (x / x))));
}
double code(double x) {
	return ((double) (((double) (x * x)) + -1.0));
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.0

    \[x \cdot x - \frac{x}{x}\]
  2. Simplified0.0

    \[\leadsto \color{blue}{x \cdot x + -1}\]
  3. Final simplification0.0

    \[\leadsto x \cdot x + -1\]

Reproduce

herbie shell --seed 2020153 
(FPCore (x)
  :name "(- (* x x) (/ x x))"
  :precision binary64
  (- (* x x) (/ x x)))