Average Error: 0.1 → 0.1
Time: 945.0ms
Precision: binary64
\[\left(\left(x + x \cdot x\right) + \left(x \cdot x\right) \cdot x\right) + 1\]
\[\left(1 + x\right) + x \cdot \left(x + x \cdot x\right)\]
\left(\left(x + x \cdot x\right) + \left(x \cdot x\right) \cdot x\right) + 1
\left(1 + x\right) + x \cdot \left(x + x \cdot x\right)
double code(double x) {
	return ((double) (((double) (((double) (x + ((double) (x * x)))) + ((double) (((double) (x * x)) * x)))) + 1.0));
}
double code(double x) {
	return ((double) (((double) (1.0 + x)) + ((double) (x * ((double) (x + ((double) (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(\left(x + x \cdot x\right) + \left(x \cdot x\right) \cdot x\right) + 1\]
  2. Simplified0.1

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

    \[\leadsto \left(1 + x\right) + x \cdot \left(x + x \cdot x\right)\]

Reproduce

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