Average Error: 0.0 → 0.0
Time: 36.0s
Precision: 64
Internal Precision: 384
\[\begin{array}{l} \mathbf{if}\;x \lt 0.0001:\\ \;\;\;\;1 + 0.5 \cdot x\\ \mathbf{else}:\\ \;\;\;\;\sqrt{1 + x}\\ \end{array}\]
\[\begin{array}{l} \mathbf{if}\;x \lt 0.0001:\\ \;\;\;\;1 + 0.5 \cdot x\\ \mathbf{else}:\\ \;\;\;\;\sqrt{1 + x}\\ \end{array}\]

Error

Bits error versus x

Derivation

  1. Initial program 0.0

    \[\begin{array}{l} \mathbf{if}\;x \lt 0.0001:\\ \;\;\;\;1 + 0.5 \cdot x\\ \mathbf{else}:\\ \;\;\;\;\sqrt{1 + x}\\ \end{array}\]

Runtime

Time bar (total: 36.0s)Debug log

herbie shell --seed '#(1743936871 1855164119 3668777427 1254258049 132811564 1366975197)' 
(FPCore (x)
  :name "squareRoot3Invalid"
  :pre (< 0 x 10)
  (if (< x 0.0001) (+ 1 (* 0.5 x)) (sqrt (+ 1 x))))