\[\frac{\left(-b/2\right) + \sqrt{{b/2}^2 - a \cdot c}}{a}\]
Test:
NMSE problem 3.2.1, positive
Bits:
128 bits
Bits error versus a
Bits error versus b/2
Bits error versus c
Time: 18.8 s
Input Error: 33.9
Output Error: 5.7
Log:
Profile: 🕒
\(\begin{cases} -2 \cdot \frac{b/2}{a} & \text{when } b/2 \le -5.215706425974793 \cdot 10^{+89} \\ \left(\left(-b/2\right) + \sqrt{{b/2}^2 - a \cdot c}\right) \cdot \frac{1}{a} & \text{when } b/2 \le 3.664277580957564 \cdot 10^{-136} \\ \log_* (1 + (e^{\frac{c}{\left(-b/2\right) - \sqrt{b/2 \cdot b/2 - c \cdot a}}} - 1)^*) & \text{when } b/2 \le 2.993431952201985 \cdot 10^{+83} \\ \frac{b/2 + \left(-b/2\right)}{a} - \frac{c}{\frac{b/2}{\frac{1}{2}}} & \text{otherwise} \end{cases}\)

    if b/2 < -5.215706425974793e+89

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

    if -5.215706425974793e+89 < b/2 < 3.664277580957564e-136

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

    if 3.664277580957564e-136 < b/2 < 2.993431952201985e+83

    1. Started with
      \[\frac{\left(-b/2\right) + \sqrt{{b/2}^2 - a \cdot c}}{a}\]
      42.9
    2. Using strategy rm
      42.9
    3. Applied flip-+ to get
      \[\frac{\color{red}{\left(-b/2\right) + \sqrt{{b/2}^2 - a \cdot c}}}{a} \leadsto \frac{\color{blue}{\frac{{\left(-b/2\right)}^2 - {\left(\sqrt{{b/2}^2 - a \cdot c}\right)}^2}{\left(-b/2\right) - \sqrt{{b/2}^2 - a \cdot c}}}}{a}\]
      43.0
    4. Applied simplify to get
      \[\frac{\frac{\color{red}{{\left(-b/2\right)}^2 - {\left(\sqrt{{b/2}^2 - a \cdot c}\right)}^2}}{\left(-b/2\right) - \sqrt{{b/2}^2 - a \cdot c}}}{a} \leadsto \frac{\frac{\color{blue}{a \cdot c}}{\left(-b/2\right) - \sqrt{{b/2}^2 - a \cdot c}}}{a}\]
      18.9
    5. Using strategy rm
      18.9
    6. Applied log1p-expm1-u to get
      \[\color{red}{\frac{\frac{a \cdot c}{\left(-b/2\right) - \sqrt{{b/2}^2 - a \cdot c}}}{a}} \leadsto \color{blue}{\log_* (1 + (e^{\frac{\frac{a \cdot c}{\left(-b/2\right) - \sqrt{{b/2}^2 - a \cdot c}}}{a}} - 1)^*)}\]
      19.5
    7. Applied simplify to get
      \[\log_* (1 + \color{red}{(e^{\frac{\frac{a \cdot c}{\left(-b/2\right) - \sqrt{{b/2}^2 - a \cdot c}}}{a}} - 1)^*}) \leadsto \log_* (1 + \color{blue}{(e^{\frac{c}{\left(-b/2\right) - \sqrt{b/2 \cdot b/2 - c \cdot a}}} - 1)^*})\]
      5.6

    if 2.993431952201985e+83 < b/2

    1. Started with
      \[\frac{\left(-b/2\right) + \sqrt{{b/2}^2 - a \cdot c}}{a}\]
      58.6
    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(b/2 - \frac{1}{2} \cdot \frac{c \cdot a}{b/2}\right)}{a}\]
      41.1
    3. Taylor expanded around inf to get
      \[\frac{\left(-b/2\right) + \color{red}{\left(b/2 - \frac{1}{2} \cdot \frac{c \cdot a}{b/2}\right)}}{a} \leadsto \frac{\left(-b/2\right) + \color{blue}{\left(b/2 - \frac{1}{2} \cdot \frac{c \cdot a}{b/2}\right)}}{a}\]
      41.1
    4. Applied simplify to get
      \[\color{red}{\frac{\left(-b/2\right) + \left(b/2 - \frac{1}{2} \cdot \frac{c \cdot a}{b/2}\right)}{a}} \leadsto \color{blue}{\frac{b/2 + \left(-b/2\right)}{a} - \frac{c}{\frac{b/2}{\frac{1}{2}}}}\]
      0.1

  1. Removed slow pow expressions

Original test:


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