\[\frac{\left(-b/2\right) - \sqrt{{b/2}^2 - a \cdot c}}{a}\]
Test:
NMSE problem 3.2.1, negative
Bits:
128 bits
Bits error versus a
Bits error versus b/2
Bits error versus c
Time: 13.8 s
Input Error: 38.8
Output Error: 4.4
Log:
Profile: 🕒
\(\begin{cases} \frac{b/2 + \left(-b/2\right)}{a} - \frac{1}{2} \cdot \frac{c}{b/2} & \text{when } b/2 \le -7.815386559610909 \cdot 10^{-127} \\ \frac{-b/2}{a} - \frac{\sqrt{{b/2}^2 - a \cdot c}}{a} & \text{when } b/2 \le 2.993431952201985 \cdot 10^{+83} \\ \left(\left(-\frac{b/2}{a}\right) - \frac{b/2}{a}\right) + \frac{1}{2} \cdot \frac{c}{b/2} & \text{otherwise} \end{cases}\)

    if b/2 < -7.815386559610909e-127

    1. Started with
      \[\frac{\left(-b/2\right) - \sqrt{{b/2}^2 - a \cdot c}}{a}\]
      58.5
    2. Applied taylor to get
      \[\frac{\left(-b/2\right) - \sqrt{{b/2}^2 - a \cdot c}}{a} \leadsto \frac{\left(-b/2\right) - \left(\frac{1}{2} \cdot \frac{c \cdot a}{b/2} - b/2\right)}{a}\]
      37.1
    3. Taylor expanded around -inf to get
      \[\frac{\left(-b/2\right) - \color{red}{\left(\frac{1}{2} \cdot \frac{c \cdot a}{b/2} - b/2\right)}}{a} \leadsto \frac{\left(-b/2\right) - \color{blue}{\left(\frac{1}{2} \cdot \frac{c \cdot a}{b/2} - b/2\right)}}{a}\]
      37.1
    4. Applied simplify to get
      \[\color{red}{\frac{\left(-b/2\right) - \left(\frac{1}{2} \cdot \frac{c \cdot a}{b/2} - b/2\right)}{a}} \leadsto \color{blue}{\frac{b/2 + \left(-b/2\right)}{a} - \frac{1}{2} \cdot \frac{c}{b/2}}\]
      0.0

    if -7.815386559610909e-127 < b/2 < 2.993431952201985e+83

    1. Started with
      \[\frac{\left(-b/2\right) - \sqrt{{b/2}^2 - a \cdot c}}{a}\]
      11.8
    2. Using strategy rm
      11.8
    3. Applied div-sub to get
      \[\color{red}{\frac{\left(-b/2\right) - \sqrt{{b/2}^2 - a \cdot c}}{a}} \leadsto \color{blue}{\frac{-b/2}{a} - \frac{\sqrt{{b/2}^2 - a \cdot c}}{a}}\]
      11.8

    if 2.993431952201985e+83 < b/2

    1. Started with
      \[\frac{\left(-b/2\right) - \sqrt{{b/2}^2 - a \cdot c}}{a}\]
      44.2
    2. Using strategy rm
      44.2
    3. Applied div-sub to get
      \[\color{red}{\frac{\left(-b/2\right) - \sqrt{{b/2}^2 - a \cdot c}}{a}} \leadsto \color{blue}{\frac{-b/2}{a} - \frac{\sqrt{{b/2}^2 - a \cdot c}}{a}}\]
      44.2
    4. Applied taylor to get
      \[\frac{-b/2}{a} - \frac{\sqrt{{b/2}^2 - a \cdot c}}{a} \leadsto \frac{-b/2}{a} - \frac{b/2 - \frac{1}{2} \cdot \frac{c \cdot a}{b/2}}{a}\]
      10.1
    5. Taylor expanded around inf to get
      \[\frac{-b/2}{a} - \frac{\color{red}{b/2 - \frac{1}{2} \cdot \frac{c \cdot a}{b/2}}}{a} \leadsto \frac{-b/2}{a} - \frac{\color{blue}{b/2 - \frac{1}{2} \cdot \frac{c \cdot a}{b/2}}}{a}\]
      10.1
    6. Applied simplify to get
      \[\color{red}{\frac{-b/2}{a} - \frac{b/2 - \frac{1}{2} \cdot \frac{c \cdot a}{b/2}}{a}} \leadsto \color{blue}{\left(\left(-\frac{b/2}{a}\right) - \frac{b/2}{a}\right) + \frac{1}{2} \cdot \frac{c}{b/2}}\]
      0.0

  1. Removed slow pow expressions

Original test:


(lambda ((a default) (b/2 default) (c default))
  #:name "NMSE problem 3.2.1, negative"
  (/ (- (- b/2) (sqrt (- (sqr b/2) (* a c)))) a))