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

Error

Bits error versus b

Bits error versus ac

Derivation

  1. Initial program 29.3

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

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

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

Reproduce

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