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

Error

Bits error versus b

Bits error versus a

Bits error versus c

Derivation

  1. Initial program 34.5

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

    \[\leadsto \color{blue}{\frac{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} - \frac{b}{2 \cdot a}}\]
  3. Final simplification34.5

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

Reproduce

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