\[\frac{\left(-b\right) - \sqrt{{b}^2 - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\]
Test:
NMSE p42, negative
Bits:
128 bits
Bits error versus a
Bits error versus b
Bits error versus c
Time: 48.6 s
Input Error: 33.5
Output Error: 5.4
Log:
Profile: 🕒
\(\begin{cases} \frac{c}{b} \cdot \frac{-2}{2} & \text{when } b \le -1.3574531607557133 \cdot 10^{+150} \\ \frac{\frac{c}{\frac{2}{4}}}{\sqrt{b \cdot b - 4 \cdot \left(c \cdot a\right)} + \left(-b\right)} & \text{when } b \le 4.531211813689417 \cdot 10^{-280} \\ \frac{-b}{2 \cdot a} - \frac{\sqrt{{b}^2 - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a} & \text{when } b \le 3.741572576046744 \cdot 10^{+123} \\ \left(\frac{c}{b} + \frac{-b}{2 \cdot a}\right) - \frac{\frac{b}{2}}{a} & \text{otherwise} \end{cases}\)

    if b < -1.3574531607557133e+150

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

    if -1.3574531607557133e+150 < b < 4.531211813689417e-280

    1. Started with
      \[\frac{\left(-b\right) - \sqrt{{b}^2 - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\]
      33.4
    2. Using strategy rm
      33.4
    3. Applied flip-- to get
      \[\frac{\color{red}{\left(-b\right) - \sqrt{{b}^2 - 4 \cdot \left(a \cdot c\right)}}}{2 \cdot a} \leadsto \frac{\color{blue}{\frac{{\left(-b\right)}^2 - {\left(\sqrt{{b}^2 - 4 \cdot \left(a \cdot c\right)}\right)}^2}{\left(-b\right) + \sqrt{{b}^2 - 4 \cdot \left(a \cdot c\right)}}}}{2 \cdot a}\]
      33.5
    4. Applied associate-/l/ to get
      \[\color{red}{\frac{\frac{{\left(-b\right)}^2 - {\left(\sqrt{{b}^2 - 4 \cdot \left(a \cdot c\right)}\right)}^2}{\left(-b\right) + \sqrt{{b}^2 - 4 \cdot \left(a \cdot c\right)}}}{2 \cdot a}} \leadsto \color{blue}{\frac{{\left(-b\right)}^2 - {\left(\sqrt{{b}^2 - 4 \cdot \left(a \cdot c\right)}\right)}^2}{\left(2 \cdot a\right) \cdot \left(\left(-b\right) + \sqrt{{b}^2 - 4 \cdot \left(a \cdot c\right)}\right)}}\]
      37.1
    5. Applied taylor to get
      \[\frac{{\left(-b\right)}^2 - {\left(\sqrt{{b}^2 - 4 \cdot \left(a \cdot c\right)}\right)}^2}{\left(2 \cdot a\right) \cdot \left(\left(-b\right) + \sqrt{{b}^2 - 4 \cdot \left(a \cdot c\right)}\right)} \leadsto \frac{4 \cdot \left(c \cdot a\right)}{\left(2 \cdot a\right) \cdot \left(\left(-b\right) + \sqrt{{b}^2 - 4 \cdot \left(a \cdot c\right)}\right)}\]
      18.9
    6. Taylor expanded around inf to get
      \[\frac{\color{red}{4 \cdot \left(c \cdot a\right)}}{\left(2 \cdot a\right) \cdot \left(\left(-b\right) + \sqrt{{b}^2 - 4 \cdot \left(a \cdot c\right)}\right)} \leadsto \frac{\color{blue}{4 \cdot \left(c \cdot a\right)}}{\left(2 \cdot a\right) \cdot \left(\left(-b\right) + \sqrt{{b}^2 - 4 \cdot \left(a \cdot c\right)}\right)}\]
      18.9
    7. Applied simplify to get
      \[\frac{4 \cdot \left(c \cdot a\right)}{\left(2 \cdot a\right) \cdot \left(\left(-b\right) + \sqrt{{b}^2 - 4 \cdot \left(a \cdot c\right)}\right)} \leadsto \frac{\frac{\frac{4}{a} \cdot \left(c \cdot a\right)}{2}}{\left(-b\right) + \sqrt{b \cdot b - \left(c \cdot 4\right) \cdot a}}\]
      14.0

    8. Applied final simplification
    9. Applied simplify to get
      \[\color{red}{\frac{\frac{\frac{4}{a} \cdot \left(c \cdot a\right)}{2}}{\left(-b\right) + \sqrt{b \cdot b - \left(c \cdot 4\right) \cdot a}}} \leadsto \color{blue}{\frac{\frac{c}{\frac{2}{4}}}{\sqrt{b \cdot b - 4 \cdot \left(c \cdot a\right)} + \left(-b\right)}}\]
      7.9

    if 4.531211813689417e-280 < b < 3.741572576046744e+123

    1. Started with
      \[\frac{\left(-b\right) - \sqrt{{b}^2 - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\]
      7.9
    2. Using strategy rm
      7.9
    3. Applied div-sub to get
      \[\color{red}{\frac{\left(-b\right) - \sqrt{{b}^2 - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}} \leadsto \color{blue}{\frac{-b}{2 \cdot a} - \frac{\sqrt{{b}^2 - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}}\]
      7.9

    if 3.741572576046744e+123 < b

    1. Started with
      \[\frac{\left(-b\right) - \sqrt{{b}^2 - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\]
      51.0
    2. Using strategy rm
      51.0
    3. Applied div-sub to get
      \[\color{red}{\frac{\left(-b\right) - \sqrt{{b}^2 - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}} \leadsto \color{blue}{\frac{-b}{2 \cdot a} - \frac{\sqrt{{b}^2 - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}}\]
      51.0
    4. Applied taylor to get
      \[\frac{-b}{2 \cdot a} - \frac{\sqrt{{b}^2 - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a} \leadsto \frac{-b}{2 \cdot a} - \frac{b - 2 \cdot \frac{c \cdot a}{b}}{2 \cdot a}\]
      12.6
    5. Taylor expanded around inf to get
      \[\frac{-b}{2 \cdot a} - \frac{\color{red}{b - 2 \cdot \frac{c \cdot a}{b}}}{2 \cdot a} \leadsto \frac{-b}{2 \cdot a} - \frac{\color{blue}{b - 2 \cdot \frac{c \cdot a}{b}}}{2 \cdot a}\]
      12.6
    6. Applied simplify to get
      \[\color{red}{\frac{-b}{2 \cdot a} - \frac{b - 2 \cdot \frac{c \cdot a}{b}}{2 \cdot a}} \leadsto \color{blue}{\left(\frac{\frac{c}{b}}{1} + \frac{-b}{2 \cdot a}\right) - \frac{\frac{b}{2}}{a}}\]
      0.0
    7. Applied simplify to get
      \[\color{red}{\left(\frac{\frac{c}{b}}{1} + \frac{-b}{2 \cdot a}\right)} - \frac{\frac{b}{2}}{a} \leadsto \color{blue}{\left(\frac{c}{b} + \frac{-b}{2 \cdot a}\right)} - \frac{\frac{b}{2}}{a}\]
      0.0

  1. Removed slow pow expressions

Original test:


(lambda ((a default) (b default) (c default))
  #:name "NMSE p42, negative"
  (/ (- (- b) (sqrt (- (sqr b) (* 4 (* a c))))) (* 2 a))
  #:target
  (if (< b 0) (/ c (* a (/ (+ (- b) (sqrt (- (sqr b) (* 4 (* a c))))) (* 2 a)))) (/ (- (- b) (sqrt (- (sqr b) (* 4 (* a c))))) (* 2 a))))