Average Error: 22.6 → 22.6
Time: 2.3s
Precision: binary64
\[\frac{\left(-b\right) - \sqrt{{b}^{2} - 4 \cdot ac}}{2 \cdot a} - \left(-timeout\right)\]
\[timeout - \frac{b + \sqrt{{b}^{2} - 4 \cdot ac}}{2 \cdot a}\]

Error

Bits error versus b

Bits error versus ac

Bits error versus a

Bits error versus timeout

Derivation

  1. Initial program 22.6

    \[\frac{\left(-b\right) - \sqrt{{b}^{2} - 4 \cdot ac}}{2 \cdot a} - \left(-timeout\right)\]
  2. Simplified22.6

    \[\leadsto \color{blue}{timeout - \frac{b + \sqrt{{b}^{2} - 4 \cdot ac}}{2 \cdot a}}\]
  3. Final simplification22.6

    \[\leadsto timeout - \frac{b + \sqrt{{b}^{2} - 4 \cdot ac}}{2 \cdot a}\]

Reproduce

herbie shell --seed 2020152 
(FPCore (b ac a timeout)
  :name "(- (/ (- (- b) (sqrt (- (pow b 2) (* 4 ac)))) (* 2 a)) (- timeout))"
  :precision binary64
  (- (/ (- (neg b) (sqrt (- (pow b 2.0) (* 4.0 ac)))) (* 2.0 a)) (neg timeout)))