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

Error

Bits error versus c

Bits error versus b

Bits error versus a

Derivation

  1. Initial program 29.7

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

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

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

Reproduce

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