\[\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: 1.4 m
Input Error: 37.1
Output Error: 5.2
Log:
Profile: 🕒
\(\begin{cases} \frac{\frac{1}{2}}{\frac{b/2}{c}} - \frac{b/2}{a} \cdot 2 & \text{when } b/2 \le -2.2913476789857995 \cdot 10^{+35} \\ \frac{\left(-b/2\right) + \sqrt{{b/2}^2 - a \cdot c}}{a} & \text{when } b/2 \le 2.890760014197913 \cdot 10^{-73} \\ \frac{-1}{2} \cdot \frac{c}{b/2} & \text{otherwise} \end{cases}\)

    if b/2 < -2.2913476789857995e+35

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

    if -2.2913476789857995e+35 < b/2 < 2.890760014197913e-73

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

    if 2.890760014197913e-73 < b/2

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