\[\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: 32.0 s
Input Error: 34.2
Output Error: 6.0
Log:
Profile: 🕒
\(\begin{cases} \frac{4}{2} \cdot \frac{\frac{c}{2}}{\frac{a}{b} \cdot c - b} & \text{when } b \le -8.642142288968947 \cdot 10^{+88} \\ \frac{c}{2} \cdot \frac{4}{\left(-b\right) + \sqrt{{b}^2 - \left(c \cdot a\right) \cdot 4}} & \text{when } b \le -3.247958591749237 \cdot 10^{-290} \\ \frac{\left(-b\right) - \sqrt{{b}^2 - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a} & \text{when } b \le 2.2736054037680634 \cdot 10^{+124} \\ \frac{\left(\left(-b\right) - b\right) + \frac{2 \cdot c}{\frac{b}{a}}}{a \cdot 2} & \text{otherwise} \end{cases}\)

    if b < -8.642142288968947e+88

    1. Started with
      \[\frac{\left(-b\right) - \sqrt{{b}^2 - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\]
      58.9
    2. Using strategy rm
      58.9
    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}\]
      59.0
    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}\]
      34.8
    5. Using strategy rm
      34.8
    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)}}}}}\]
      34.9
    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)}}\]
      33.0
    8. Applied taylor to get
      \[\frac{1}{\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}{\left(2 \cdot \frac{c \cdot a}{b} - 2 \cdot b\right) \cdot \left(\frac{1}{c} \cdot \frac{2}{4}\right)}\]
      8.7
    9. Taylor expanded around -inf to get
      \[\frac{1}{\color{red}{\left(2 \cdot \frac{c \cdot a}{b} - 2 \cdot b\right)} \cdot \left(\frac{1}{c} \cdot \frac{2}{4}\right)} \leadsto \frac{1}{\color{blue}{\left(2 \cdot \frac{c \cdot a}{b} - 2 \cdot b\right)} \cdot \left(\frac{1}{c} \cdot \frac{2}{4}\right)}\]
      8.7
    10. Applied simplify to get
      \[\color{red}{\frac{1}{\left(2 \cdot \frac{c \cdot a}{b} - 2 \cdot b\right) \cdot \left(\frac{1}{c} \cdot \frac{2}{4}\right)}} \leadsto \color{blue}{\frac{1}{\frac{2}{4}} \cdot \frac{\frac{c}{2}}{\frac{a}{b} \cdot c - b}}\]
      1.0
    11. Applied simplify to get
      \[\color{red}{\frac{1}{\frac{2}{4}}} \cdot \frac{\frac{c}{2}}{\frac{a}{b} \cdot c - b} \leadsto \color{blue}{\frac{4}{2}} \cdot \frac{\frac{c}{2}}{\frac{a}{b} \cdot c - b}\]
      1.0

    if -8.642142288968947e+88 < b < -3.247958591749237e-290

    1. Started with
      \[\frac{\left(-b\right) - \sqrt{{b}^2 - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\]
      32.7
    2. Using strategy rm
      32.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}\]
      32.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.0
    5. Using strategy rm
      17.0
    6. Applied *-un-lft-identity to get
      \[\frac{\frac{c \cdot \left(4 \cdot a\right)}{\color{red}{\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)}{\color{blue}{1 \cdot \left(\left(-b\right) + \sqrt{{b}^2 - 4 \cdot \left(a \cdot c\right)}\right)}}}{2 \cdot a}\]
      17.0
    7. Applied times-frac to get
      \[\frac{\color{red}{\frac{c \cdot \left(4 \cdot a\right)}{1 \cdot \left(\left(-b\right) + \sqrt{{b}^2 - 4 \cdot \left(a \cdot c\right)}\right)}}}{2 \cdot a} \leadsto \frac{\color{blue}{\frac{c}{1} \cdot \frac{4 \cdot a}{\left(-b\right) + \sqrt{{b}^2 - 4 \cdot \left(a \cdot c\right)}}}}{2 \cdot a}\]
      15.2
    8. Applied times-frac to get
      \[\color{red}{\frac{\frac{c}{1} \cdot \frac{4 \cdot a}{\left(-b\right) + \sqrt{{b}^2 - 4 \cdot \left(a \cdot c\right)}}}{2 \cdot a}} \leadsto \color{blue}{\frac{\frac{c}{1}}{2} \cdot \frac{\frac{4 \cdot a}{\left(-b\right) + \sqrt{{b}^2 - 4 \cdot \left(a \cdot c\right)}}}{a}}\]
      10.1
    9. Applied simplify to get
      \[\color{red}{\frac{\frac{c}{1}}{2}} \cdot \frac{\frac{4 \cdot a}{\left(-b\right) + \sqrt{{b}^2 - 4 \cdot \left(a \cdot c\right)}}}{a} \leadsto \color{blue}{\frac{c}{2}} \cdot \frac{\frac{4 \cdot a}{\left(-b\right) + \sqrt{{b}^2 - 4 \cdot \left(a \cdot c\right)}}}{a}\]
      10.1
    10. Applied simplify to get
      \[\frac{c}{2} \cdot \color{red}{\frac{\frac{4 \cdot a}{\left(-b\right) + \sqrt{{b}^2 - 4 \cdot \left(a \cdot c\right)}}}{a}} \leadsto \frac{c}{2} \cdot \color{blue}{\frac{4}{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot c\right) \cdot a}}}\]
      8.9
    11. Applied simplify to get
      \[\frac{c}{2} \cdot \frac{4}{\color{red}{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot c\right) \cdot a}}} \leadsto \frac{c}{2} \cdot \frac{4}{\color{blue}{\left(-b\right) + \sqrt{{b}^2 - \left(c \cdot a\right) \cdot 4}}}\]
      8.8

    if -3.247958591749237e-290 < b < 2.2736054037680634e+124

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

    if 2.2736054037680634e+124 < b

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

    7. Applied final simplification

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