Average Error: 0.1 → 0.1
Time: 1.2s
Precision: binary64
\[\left(\left(x \cdot x - 7 \cdot x\right) \cdot x + 28 \cdot x\right) \cdot x - 56 \cdot x\]
\[x \cdot \left(x \cdot \left(28 + x \cdot \left(x - 7\right)\right) - 56\right)\]
\left(\left(x \cdot x - 7 \cdot x\right) \cdot x + 28 \cdot x\right) \cdot x - 56 \cdot x
x \cdot \left(x \cdot \left(28 + x \cdot \left(x - 7\right)\right) - 56\right)
double code(double x) {
	return ((double) (((double) (((double) (((double) (((double) (((double) (x * x)) - ((double) (7.0 * x)))) * x)) + ((double) (28.0 * x)))) * x)) - ((double) (56.0 * x))));
}
double code(double x) {
	return ((double) (x * ((double) (((double) (x * ((double) (28.0 + ((double) (x * ((double) (x - 7.0)))))))) - 56.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.1

    \[\left(\left(x \cdot x - 7 \cdot x\right) \cdot x + 28 \cdot x\right) \cdot x - 56 \cdot x\]
  2. Simplified0.1

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

    \[\leadsto x \cdot \left(x \cdot \left(28 + x \cdot \left(x - 7\right)\right) - 56\right)\]

Reproduce

herbie shell --seed 2020152 
(FPCore (x)
  :name "(- (* (+ (* (- (* x x) (* 7 x)) x) (* 28 x)) x) (* 56 x))"
  :precision binary64
  (- (* (+ (* (- (* x x) (* 7.0 x)) x) (* 28.0 x)) x) (* 56.0 x)))