Input Error: 34.6b
Output Error: 8.0b
Time: 28.3s
Precision: 64b
Ground Truth: 128b
\[\frac{\left(-b/2\right) + \sqrt{{b/2}^2 - a \cdot c}}{a}\]
\[\begin{cases} -2 \cdot \frac{b/2}{a} & \text{when } b/2 \le -2.4063664882097058 \cdot 10^{+146} \\ \frac{\left(-b/2\right) + \sqrt{{b/2}^2 - a \cdot c}}{a} & \text{when } b/2 \le 0.034260571810453756 \\ \frac{b/2 + \left(-b/2\right)}{a} - \frac{1}{2} \cdot \frac{c}{b/2} & \text{otherwise} \end{cases}\]

Error

Bits error versus a
Bits error versus b/2
Bits error versus c

Derivation

    if b/2 < -2.4063664882097058e+146

    1. Initial program 57.8b

      \[\frac{\left(-b/2\right) + \sqrt{{b/2}^2 - a \cdot c}}{a}\]
    2. Applied taylor 0b

      \[\leadsto -2 \cdot \frac{b/2}{a}\]
    3. Taylor expanded around -inf 0b

      \[\leadsto \color{blue}{-2 \cdot \frac{b/2}{a}}\]

    if -2.4063664882097058e+146 < b/2 < 0.034260571810453756

    1. Initial program 14.7b

      \[\frac{\left(-b/2\right) + \sqrt{{b/2}^2 - a \cdot c}}{a}\]

    if 0.034260571810453756 < b/2

    1. Initial program 57.9b

      \[\frac{\left(-b/2\right) + \sqrt{{b/2}^2 - a \cdot c}}{a}\]
    2. Applied taylor 42.5b

      \[\leadsto \frac{\left(-b/2\right) + \left(b/2 - \frac{1}{2} \cdot \frac{a \cdot c}{b/2}\right)}{a}\]
    3. Taylor expanded around inf 42.5b

      \[\leadsto \frac{\left(-b/2\right) + \color{blue}{\left(b/2 - \frac{1}{2} \cdot \frac{a \cdot c}{b/2}\right)}}{a}\]
    4. Applied simplify 0.0b

      \[\leadsto \color{blue}{\frac{b/2 + \left(-b/2\right)}{a} - \frac{1}{2} \cdot \frac{c}{b/2}}\]
  1. Removed slow pow expressions

Runtime

Total time: 28.3s Debug log

herbie --seed '#(3320289281 2649496787 2890601479 1530152362 3512035856 623589213)'
(FPCore (a b/2 c)
  :name "NMSE problem 3.2.1, positive"
  (/ (+ (- b/2) (sqrt (- (sqr b/2) (* a c)))) a))