Average Error: 0.0 → 0.0
Time: 2.3s
Precision: 64
Internal precision: 384
\[\begin{array}{l} \mathbf{if}\;x \cdot x - x \ge 0:\\ \;\;\;\;\frac{x}{10}\\ \mathbf{else}:\\ \;\;\;\;x \cdot x + 2\\ \end{array}\]
\[\begin{array}{l} \mathbf{if}\;x \cdot x - x \ge 0:\\ \;\;\;\;\frac{x}{10}\\ \mathbf{else}:\\ \;\;\;\;x \cdot x + 2\\ \end{array}\]

Error

Bits error versus x

Derivation

  1. Initial program 0.0

    \[\begin{array}{l} \mathbf{if}\;x \cdot x - x \ge 0:\\ \;\;\;\;\frac{x}{10}\\ \mathbf{else}:\\ \;\;\;\;x \cdot x + 2\\ \end{array}\]
  2. Removed slow pow expressions

Runtime

Time bar (total: 2.3s) Debug log

Please include this information when filing a bug report:

herbie shell --seed '#(3052192724 3812927732 3686175817 630908657 2373248591 511094450)'
(FPCore (x)
  :name "cav10"
  :pre (< 0 x 10)
  (if (>= (- (* x x) x) 0) (/ x 10) (+ (* x x) 2)))