Average Error: 0.1 → 0.0
Time: 858.0ms
Precision: binary64
\[\left(1 + x \cdot x\right) + \left(x \cdot x\right) \cdot x\]
\[\left({x}^{3} + x \cdot x\right) + 1\]
\left(1 + x \cdot x\right) + \left(x \cdot x\right) \cdot x
\left({x}^{3} + x \cdot x\right) + 1
double code(double x) {
	return ((double) (((double) (1.0 + ((double) (x * x)))) + ((double) (((double) (x * x)) * x))));
}
double code(double x) {
	return ((double) (((double) (((double) pow(x, 3.0)) + ((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.1

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

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

    \[\leadsto \left({x}^{3} + x \cdot x\right) + 1\]

Reproduce

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