Average Error: 27.2 → 27.2
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 27.2

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

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

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

Reproduce

herbie shell --seed 2020152 
(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)))