Average Error: 47.2 → 47.2
Time: 2.5s
Precision: binary64
\[\frac{\left(-b\right) + \sqrt{{b}^{2} - \left(4 \cdot 10\right) \cdot 5}}{2 \cdot 10}\]
\[\frac{\frac{\sqrt{{b}^{2} - \left(4 \cdot 10\right) \cdot 5} - b}{2}}{10}\]

Error

Bits error versus b

Derivation

  1. Initial program 47.2

    \[\frac{\left(-b\right) + \sqrt{{b}^{2} - \left(4 \cdot 10\right) \cdot 5}}{2 \cdot 10}\]
  2. Simplified47.2

    \[\leadsto \color{blue}{\frac{\frac{\sqrt{{b}^{2} - \left(4 \cdot 10\right) \cdot 5} - b}{2}}{10}}\]
  3. Final simplification47.2

    \[\leadsto \frac{\frac{\sqrt{{b}^{2} - \left(4 \cdot 10\right) \cdot 5} - b}{2}}{10}\]

Reproduce

herbie shell --seed 2020152 
(FPCore (b)
  :name "(/ (+ (- b) (sqrt (- (pow b 2) (* (* 4 10) 5)))) (* 2 10))"
  :precision binary64
  (/ (+ (neg b) (sqrt (- (pow b 2.0) (* (* 4.0 10.0) 5.0)))) (* 2.0 10.0)))