Average Error: 0.2 → 0.2
Time: 1.0s
Precision: binary64
\[\left(x \cdot x\right) \cdot x - \left(\left(\left(3 \cdot x\right) \cdot x\right) \cdot x\right) \cdot x\]
\[\left(x \cdot x\right) \cdot x - \left(\left(\left(3 \cdot x\right) \cdot x\right) \cdot x\right) \cdot x\]
\left(x \cdot x\right) \cdot x - \left(\left(\left(3 \cdot x\right) \cdot x\right) \cdot x\right) \cdot x
\left(x \cdot x\right) \cdot x - \left(\left(\left(3 \cdot x\right) \cdot x\right) \cdot x\right) \cdot x
double code(double x) {
	return ((double) (((double) (((double) (x * x)) * x)) - ((double) (((double) (((double) (((double) (3.0 * x)) * x)) * x)) * x))));
}
double code(double x) {
	return ((double) (((double) (((double) (x * x)) * x)) - ((double) (((double) (((double) (((double) (3.0 * x)) * 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.2

    \[\left(x \cdot x\right) \cdot x - \left(\left(\left(3 \cdot x\right) \cdot x\right) \cdot x\right) \cdot x\]
  2. Final simplification0.2

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

Reproduce

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