Average Error: 0 → 0
Time: 961.0ms
Precision: binary64
Cost: 320
\[0 \leq x \land x \leq 2\]
\[x + x \cdot x\]
\[x + x \cdot x\]
x + x \cdot x
x + x \cdot x
(FPCore (x) :precision binary64 (+ x (* x x)))
(FPCore (x) :precision binary64 (+ x (* x x)))
double code(double x) {
	return x + (x * x);
}
double code(double x) {
	return x + (x * x);
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original0
Target0.0
Herbie0
\[\left(1 + x\right) \cdot x\]

Alternatives

Alternative 1
Error0.0
Cost320
\[x \cdot \left(x + 1\right)\]
Alternative 2
Error39.3
Cost13184
\[\sqrt[3]{{\left(x + x \cdot x\right)}^{3}}\]
Alternative 3
Error58.4
Cost19456
\[\log \left({\left(e^{x}\right)}^{\left(x + 1\right)}\right)\]

Error

Derivation

  1. Initial program 0

    \[x + x \cdot x\]
  2. Simplified0

    \[\leadsto \color{blue}{x + x \cdot x}\]
  3. Final simplification0

    \[\leadsto x + x \cdot x\]

Reproduce

herbie shell --seed 2021043 
(FPCore (x)
  :name "Expression 2, p15"
  :precision binary64
  :pre (<= 0.0 x 2.0)

  :herbie-target
  (* (+ 1.0 x) x)

  (+ x (* x x)))