Average Error: 29.5 → 29.5
Time: 1.4s
Precision: binary64
\[\frac{\left(-b\right) + \sqrt{b \cdot b - 4 \cdot c}}{2}\]
\[\frac{\left(-b\right) + \sqrt{b \cdot b - 4 \cdot c}}{2}\]

Error

Bits error versus b

Bits error versus c

Derivation

  1. Initial program 29.5

    \[\frac{\left(-b\right) + \sqrt{b \cdot b - 4 \cdot c}}{2}\]
  2. Final simplification29.5

    \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - 4 \cdot c}}{2}\]

Reproduce

herbie shell --seed 2020152 
(FPCore (b c)
  :name "(/ (+ (- b) (sqrt (- (* b b) (* 4 c)))) 2)"
  :precision binary64
  (/ (+ (neg b) (sqrt (- (* b b) (* 4.0 c)))) 2.0))