Average Error: 0.5 → 0.5
Time: 1.8s
Precision: binary64
\[\left(\left(x \cdot x - 3 \cdot x\right) \cdot x + 6 \cdot {x}^{2}\right) \cdot x - 4 \cdot {x}^{3}\]
\[\left(\left(x \cdot x - 3 \cdot x\right) \cdot x + 6 \cdot {x}^{2}\right) \cdot x - 4 \cdot {x}^{3}\]
\left(\left(x \cdot x - 3 \cdot x\right) \cdot x + 6 \cdot {x}^{2}\right) \cdot x - 4 \cdot {x}^{3}
\left(\left(x \cdot x - 3 \cdot x\right) \cdot x + 6 \cdot {x}^{2}\right) \cdot x - 4 \cdot {x}^{3}
double code(double x) {
	return ((double) (((double) (((double) (((double) (((double) (((double) (x * x)) - ((double) (3.0 * x)))) * x)) + ((double) (6.0 * ((double) pow(x, 2.0)))))) * x)) - ((double) (4.0 * ((double) pow(x, 3.0))))));
}
double code(double x) {
	return ((double) (((double) (((double) (((double) (((double) (((double) (x * x)) - ((double) (3.0 * x)))) * x)) + ((double) (6.0 * ((double) pow(x, 2.0)))))) * x)) - ((double) (4.0 * ((double) pow(x, 3.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.5

    \[\left(\left(x \cdot x - 3 \cdot x\right) \cdot x + 6 \cdot {x}^{2}\right) \cdot x - 4 \cdot {x}^{3}\]
  2. Final simplification0.5

    \[\leadsto \left(\left(x \cdot x - 3 \cdot x\right) \cdot x + 6 \cdot {x}^{2}\right) \cdot x - 4 \cdot {x}^{3}\]

Reproduce

herbie shell --seed 2020152 
(FPCore (x)
  :name "(- (* (+ (* (- (* x x) (* 3 x)) x) (* 6 (pow x 2))) x) (* 4 (pow x 3)))"
  :precision binary64
  (- (* (+ (* (- (* x x) (* 3.0 x)) x) (* 6.0 (pow x 2.0))) x) (* 4.0 (pow x 3.0))))