\[\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: 27.3 s
Input Error: 35.6
Output Error: 5.3
Log:
Profile: 🕒
\(\begin{cases} \frac{\frac{c}{\frac{2}{4}}}{\frac{c}{b} \cdot a - b} \cdot \frac{1}{2} & \text{when } b \le -1.4548518266586696 \cdot 10^{-17} \\ \frac{1}{\left(\left(-b\right) + \sqrt{{b}^2 - \left(a \cdot c\right) \cdot 4}\right) \cdot \frac{\frac{2}{c}}{4}} & \text{when } b \le -2.2367884420529847 \cdot 10^{-306} \\ \frac{\left(-b\right) - \sqrt{{b}^2 - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a} & \text{when } b \le 2.0626415808173556 \cdot 10^{+74} \\ \frac{-b}{a} & \text{otherwise} \end{cases}\)

    if b < -1.4548518266586696e-17

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

    if -1.4548518266586696e-17 < b < -2.2367884420529847e-306

    1. Started with
      \[\frac{\left(-b\right) - \sqrt{{b}^2 - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\]
      23.7
    2. Using strategy rm
      23.7
    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}\]
      23.8
    4. Applied simplify to get
      \[\frac{\frac{\color{red}{{\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 \frac{\frac{\color{blue}{c \cdot \left(4 \cdot a\right)}}{\left(-b\right) + \sqrt{{b}^2 - 4 \cdot \left(a \cdot c\right)}}}{2 \cdot a}\]
      17.4
    5. Using strategy rm
      17.4
    6. Applied clear-num to get
      \[\color{red}{\frac{\frac{c \cdot \left(4 \cdot a\right)}{\left(-b\right) + \sqrt{{b}^2 - 4 \cdot \left(a \cdot c\right)}}}{2 \cdot a}} \leadsto \color{blue}{\frac{1}{\frac{2 \cdot a}{\frac{c \cdot \left(4 \cdot a\right)}{\left(-b\right) + \sqrt{{b}^2 - 4 \cdot \left(a \cdot c\right)}}}}}\]
      17.4
    7. Applied simplify to get
      \[\frac{1}{\color{red}{\frac{2 \cdot a}{\frac{c \cdot \left(4 \cdot a\right)}{\left(-b\right) + \sqrt{{b}^2 - 4 \cdot \left(a \cdot c\right)}}}}} \leadsto \frac{1}{\color{blue}{\left(\left(-b\right) + \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}\right) \cdot \left(\frac{1}{c} \cdot \frac{2}{4}\right)}}\]
      11.0
    8. Applied simplify to get
      \[\frac{1}{\color{red}{\left(\left(-b\right) + \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}\right)} \cdot \left(\frac{1}{c} \cdot \frac{2}{4}\right)} \leadsto \frac{1}{\color{blue}{\left(\left(-b\right) + \sqrt{{b}^2 - \left(a \cdot c\right) \cdot 4}\right)} \cdot \left(\frac{1}{c} \cdot \frac{2}{4}\right)}\]
      10.9
    9. Applied simplify to get
      \[\frac{1}{\left(\left(-b\right) + \sqrt{{b}^2 - \left(a \cdot c\right) \cdot 4}\right) \cdot \color{red}{\left(\frac{1}{c} \cdot \frac{2}{4}\right)}} \leadsto \frac{1}{\left(\left(-b\right) + \sqrt{{b}^2 - \left(a \cdot c\right) \cdot 4}\right) \cdot \color{blue}{\frac{\frac{2}{c}}{4}}}\]
      10.9

    if -2.2367884420529847e-306 < b < 2.0626415808173556e+74

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

    if 2.0626415808173556e+74 < b

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