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

Error

Bits error versus b

Bits error versus c

Derivation

  1. Initial program 29.4

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

    \[\leadsto \color{blue}{\frac{\sqrt{{b}^{2} - 4 \cdot c} - b}{2}}\]
  3. Final simplification29.4

    \[\leadsto \frac{\sqrt{{b}^{2} - 4 \cdot c} - b}{2}\]

Reproduce

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