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

Error

Bits error versus b

Bits error versus a

Bits error versus c

Bits error versus h

Derivation

  1. Initial program 26.9

    \[\frac{\frac{-b}{2} + \sqrt{\frac{b \cdot b}{4} - a \cdot c}}{a} - \left(-1\right) \cdot h\]
  2. Simplified26.9

    \[\leadsto \color{blue}{1 \cdot h + \frac{\frac{-b}{2} + \sqrt{\frac{b \cdot b}{4} - a \cdot c}}{a}}\]
  3. Final simplification26.9

    \[\leadsto 1 \cdot h + \frac{\frac{-b}{2} + \sqrt{\frac{b \cdot b}{4} - a \cdot c}}{a}\]

Reproduce

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