Average Error: 0.0 → 0.0
Time: 41.0s
Precision: binary64
Cost: 320
\[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

Alternatives

Alternative 1
Error1.8
Cost520
\[\begin{array}{l} \mathbf{if}\;x \leq -0.9979022278705204 \lor \neg \left(x \leq 1.0150417341532645\right):\\ \;\;\;\;x \cdot x\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array}\]
Alternative 2
Error21.4
Cost64
\[x\]

Error

Time

Derivation

  1. Initial program 0.0

    \[x + x \cdot x\]
  2. Using strategy rm
  3. Applied pow1_binary64_18440.0

    \[\leadsto \color{blue}{{\left(x + x \cdot x\right)}^{1}}\]
  4. Using strategy rm
  5. Applied +-commutative_binary64_17130.0

    \[\leadsto {\color{blue}{\left(x \cdot x + x\right)}}^{1}\]
  6. Simplified0.0

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

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

Reproduce

herbie shell --seed 2021040 
(FPCore (x)
  :name "Main:bigenough1 from B"
  :precision binary64
  (+ x (* x x)))