\[\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: 50.9 s
Input Error: 37.6
Output Error: 4.8
Log:
\(\begin{cases} \frac{\frac{1}{2}}{b/2} \cdot c - 2 \cdot \frac{b/2}{a} & \text{when } b/2 \le -5.149274995892533 \cdot 10^{+86} \\ \frac{1}{\frac{a}{\left(-b/2\right) + \sqrt{{b/2}^2 - a \cdot c}}} & \text{when } b/2 \le 9.946391916507581 \cdot 10^{-83} \\ \frac{b/2 + \left(-b/2\right)}{a} - \frac{1}{2} \cdot \frac{c}{b/2} & \text{otherwise} \end{cases}\)

    if b/2 < -5.149274995892533e+86

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

    if -5.149274995892533e+86 < b/2 < 9.946391916507581e-83

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

    if 9.946391916507581e-83 < b/2

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

  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))