\[\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.4 s
Input Error: 35.6
Output Error: 7.2
Log:
Profile: 🕒
\(\begin{cases} \frac{1}{2} \cdot \frac{c}{b/2} - 2 \cdot \frac{b/2}{a} & \text{when } b/2 \le -1.102640798064626 \cdot 10^{+96} \\ \frac{\left(-b/2\right) + {\left(\sqrt{\sqrt{{b/2}^2 - a \cdot c}}\right)}^2}{a} & \text{when } b/2 \le -4.180861961583105 \cdot 10^{-193} \\ \frac{\frac{a \cdot c}{a}}{\left(-b/2\right) - \sqrt{{b/2}^2 - a \cdot c}} & \text{when } b/2 \le 2.2608845850534584 \cdot 10^{+29} \\ \frac{c}{\left(\left(-b/2\right) - b/2\right) + \frac{c}{b/2} \cdot \left(a \cdot \frac{1}{2}\right)} & \text{otherwise} \end{cases}\)

    if b/2 < -1.102640798064626e+96

    1. Started with
      \[\frac{\left(-b/2\right) + \sqrt{{b/2}^2 - a \cdot c}}{a}\]
      47.2
    2. Using strategy rm
      47.2
    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}}\]
      47.2
    4. Applied taylor to get
      \[\left(\left(-b/2\right) + \sqrt{{b/2}^2 - a \cdot c}\right) \cdot \frac{1}{a} \leadsto \frac{1}{2} \cdot \frac{c}{b/2} - 2 \cdot \frac{b/2}{a}\]
      0.0
    5. Taylor expanded around -inf to get
      \[\color{red}{\frac{1}{2} \cdot \frac{c}{b/2} - 2 \cdot \frac{b/2}{a}} \leadsto \color{blue}{\frac{1}{2} \cdot \frac{c}{b/2} - 2 \cdot \frac{b/2}{a}}\]
      0.0

    if -1.102640798064626e+96 < b/2 < -4.180861961583105e-193

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

    if -4.180861961583105e-193 < b/2 < 2.2608845850534584e+29

    1. Started with
      \[\frac{\left(-b/2\right) + \sqrt{{b/2}^2 - a \cdot c}}{a}\]
      25.6
    2. Using strategy rm
      25.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}}\]
      25.6
    4. Using strategy rm
      25.6
    5. Applied flip-+ to get
      \[\color{red}{\left(\left(-b/2\right) + \sqrt{{b/2}^2 - a \cdot c}\right)} \cdot \frac{1}{a} \leadsto \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}}} \cdot \frac{1}{a}\]
      25.9
    6. Applied associate-*l/ to get
      \[\color{red}{\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}} \cdot \frac{1}{a}} \leadsto \color{blue}{\frac{\left({\left(-b/2\right)}^2 - {\left(\sqrt{{b/2}^2 - a \cdot c}\right)}^2\right) \cdot \frac{1}{a}}{\left(-b/2\right) - \sqrt{{b/2}^2 - a \cdot c}}}\]
      26.0
    7. Applied simplify to get
      \[\frac{\color{red}{\left({\left(-b/2\right)}^2 - {\left(\sqrt{{b/2}^2 - a \cdot c}\right)}^2\right) \cdot \frac{1}{a}}}{\left(-b/2\right) - \sqrt{{b/2}^2 - a \cdot c}} \leadsto \frac{\color{blue}{\frac{a \cdot c}{a}}}{\left(-b/2\right) - \sqrt{{b/2}^2 - a \cdot c}}\]
      16.5

    if 2.2608845850534584e+29 < b/2

    1. Started with
      \[\frac{\left(-b/2\right) + \sqrt{{b/2}^2 - a \cdot c}}{a}\]
      58.1
    2. Using strategy rm
      58.1
    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}}\]
      58.1
    4. Using strategy rm
      58.1
    5. Applied flip-+ to get
      \[\color{red}{\left(\left(-b/2\right) + \sqrt{{b/2}^2 - a \cdot c}\right)} \cdot \frac{1}{a} \leadsto \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}}} \cdot \frac{1}{a}\]
      58.2
    6. Applied associate-*l/ to get
      \[\color{red}{\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}} \cdot \frac{1}{a}} \leadsto \color{blue}{\frac{\left({\left(-b/2\right)}^2 - {\left(\sqrt{{b/2}^2 - a \cdot c}\right)}^2\right) \cdot \frac{1}{a}}{\left(-b/2\right) - \sqrt{{b/2}^2 - a \cdot c}}}\]
      58.2
    7. Applied simplify to get
      \[\frac{\color{red}{\left({\left(-b/2\right)}^2 - {\left(\sqrt{{b/2}^2 - a \cdot c}\right)}^2\right) \cdot \frac{1}{a}}}{\left(-b/2\right) - \sqrt{{b/2}^2 - a \cdot c}} \leadsto \frac{\color{blue}{\frac{a \cdot c}{a}}}{\left(-b/2\right) - \sqrt{{b/2}^2 - a \cdot c}}\]
      30.0
    8. Applied taylor to get
      \[\frac{\frac{a \cdot c}{a}}{\left(-b/2\right) - \sqrt{{b/2}^2 - a \cdot c}} \leadsto \frac{\frac{a \cdot c}{a}}{\left(-b/2\right) - \left(b/2 - \frac{1}{2} \cdot \frac{c \cdot a}{b/2}\right)}\]
      10.5
    9. Taylor expanded around inf to get
      \[\frac{\frac{a \cdot c}{a}}{\left(-b/2\right) - \color{red}{\left(b/2 - \frac{1}{2} \cdot \frac{c \cdot a}{b/2}\right)}} \leadsto \frac{\frac{a \cdot c}{a}}{\left(-b/2\right) - \color{blue}{\left(b/2 - \frac{1}{2} \cdot \frac{c \cdot a}{b/2}\right)}}\]
      10.5
    10. Applied simplify to get
      \[\frac{\frac{a \cdot c}{a}}{\left(-b/2\right) - \left(b/2 - \frac{1}{2} \cdot \frac{c \cdot a}{b/2}\right)} \leadsto \frac{1 \cdot c}{\left(\left(-b/2\right) - b/2\right) + \frac{\frac{1}{2} \cdot c}{\frac{b/2}{a}}}\]
      2.2

    11. Applied final simplification
    12. Applied simplify to get
      \[\color{red}{\frac{1 \cdot c}{\left(\left(-b/2\right) - b/2\right) + \frac{\frac{1}{2} \cdot c}{\frac{b/2}{a}}}} \leadsto \color{blue}{\frac{c}{\left(\left(-b/2\right) - b/2\right) + \frac{c}{b/2} \cdot \left(a \cdot \frac{1}{2}\right)}}\]
      2.2

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