Average Error: 0.1 → 0.1
Time: 746.0ms
Precision: binary64
\[\left(x \cdot x\right) \cdot x - x \cdot x\]
\[x \cdot \left(x \cdot x - x\right)\]
\left(x \cdot x\right) \cdot x - x \cdot x
x \cdot \left(x \cdot x - x\right)
double code(double x) {
	return ((double) (((double) (((double) (x * x)) * x)) - ((double) (x * x))));
}
double code(double x) {
	return ((double) (x * ((double) (((double) (x * x)) - x))));
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.1

    \[\left(x \cdot x\right) \cdot x - x \cdot x\]
  2. Simplified0.1

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

    \[\leadsto x \cdot \left(x \cdot x - x\right)\]

Reproduce

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