\[\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: 19.4 s
Input Error: 33.9
Output Error: 5.9
Log:
Profile: 🕒
\(\begin{cases} \frac{\frac{1}{2}}{\frac{b/2}{c}} - \frac{b/2}{a} \cdot 2 & \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} \\ {\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 2.993431952201985 \cdot 10^{+83} \\ \left(1 \cdot \frac{-1}{2}\right) \cdot \frac{c}{b/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.2
    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}\]
      12.2
    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}\]
      12.2
    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.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.6
    2. Using strategy rm
      11.6
    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.7

    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}\]
      39.4
    2. Using strategy rm
      39.4
    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}\]
      39.5
    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}\]
      15.0
    5. Using strategy rm
      15.0
    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}\]
      15.7
    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\]
      6.8

    if 2.993431952201985e+83 < b/2

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

    7. Applied final simplification
    8. Applied simplify to get
      \[\color{red}{\frac{\frac{-1}{2}}{a} \cdot \left(\frac{c}{b/2} \cdot a\right)} \leadsto \color{blue}{\left(1 \cdot \frac{-1}{2}\right) \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))