\[\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: 15.0 s
Input Error: 16.3
Output Error: 2.5
Log:
Profile: 🕒
\(\begin{cases} -2 \cdot \frac{b/2}{a} & \text{when } b/2 \le -1.2816005f+19 \\ \frac{\left(-b/2\right) + \sqrt{{b/2}^2 - a \cdot c}}{a} & \text{when } b/2 \le 1.9502276f-23 \\ {\left(\sqrt[3]{\frac{c}{\left(-b/2\right) - \sqrt{b/2 \cdot b/2 - c \cdot a}}}\right)}^3 & \text{when } b/2 \le 100403176.0f0 \\ \frac{-1}{2} \cdot \frac{c}{b/2} & \text{otherwise} \end{cases}\)

    if b/2 < -1.2816005f+19

    1. Started with
      \[\frac{\left(-b/2\right) + \sqrt{{b/2}^2 - a \cdot c}}{a}\]
      28.9
    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 -1.2816005f+19 < b/2 < 1.9502276f-23

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

    if 1.9502276f-23 < b/2 < 100403176.0f0

    1. Started with
      \[\frac{\left(-b/2\right) + \sqrt{{b/2}^2 - a \cdot c}}{a}\]
      15.5
    2. Using strategy rm
      15.5
    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}\]
      16.1
    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}\]
      6.6
    5. Using strategy rm
      6.6
    6. Applied add-cube-cbrt to get
      \[\color{red}{\frac{\frac{a \cdot c}{\left(-b/2\right) - \sqrt{{b/2}^2 - a \cdot c}}}{a}} \leadsto \color{blue}{{\left(\sqrt[3]{\frac{\frac{a \cdot c}{\left(-b/2\right) - \sqrt{{b/2}^2 - a \cdot c}}}{a}}\right)}^3}\]
      7.0
    7. Applied simplify to get
      \[{\color{red}{\left(\sqrt[3]{\frac{\frac{a \cdot c}{\left(-b/2\right) - \sqrt{{b/2}^2 - a \cdot c}}}{a}}\right)}}^3 \leadsto {\color{blue}{\left(\sqrt[3]{\frac{c}{\left(-b/2\right) - \sqrt{b/2 \cdot b/2 - c \cdot a}}}\right)}}^3\]
      3.5

    if 100403176.0f0 < b/2

    1. Started with
      \[\frac{\left(-b/2\right) + \sqrt{{b/2}^2 - a \cdot c}}{a}\]
      28.4
    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}\]
      7.0
    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}\]
      7.0
    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))