\[\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: 26.8 s
Input Error: 36.1
Output Error: 7.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 -2.496996520939034 \cdot 10^{+74} \\ \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} & \text{when } b \le -9.074512816801552 \cdot 10^{-91} \\ \frac{\frac{c}{\frac{2}{4}}}{\frac{c}{b} \cdot a - b} \cdot \frac{1}{2} & \text{when } b \le -6.735949376426626 \cdot 10^{-136} \\ \frac{1}{2} \cdot \frac{\left(-b\right) - \sqrt{{b}^2 - 4 \cdot \left(a \cdot c\right)}}{a} & \text{when } b \le 2.7032921376893094 \cdot 10^{+83} \\ \frac{c}{b} - \frac{b}{a} & \text{otherwise} \end{cases}\)

    if b < -2.496996520939034e+74 or -9.074512816801552e-91 < b < -6.735949376426626e-136

    1. Started with
      \[\frac{\left(-b\right) - \sqrt{{b}^2 - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\]
      58.7
    2. Using strategy rm
      58.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}\]
      58.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}\]
      36.3
    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}\]
      16.1
    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}\]
      16.1
    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}}\]
      3.1

    if -2.496996520939034e+74 < b < -9.074512816801552e-91

    1. Started with
      \[\frac{\left(-b\right) - \sqrt{{b}^2 - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\]
      42.7
    2. Using strategy rm
      42.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}\]
      42.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}\]
      16.5

    if -6.735949376426626e-136 < b < 2.7032921376893094e+83

    1. Started with
      \[\frac{\left(-b\right) - \sqrt{{b}^2 - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\]
      11.0
    2. Using strategy rm
      11.0
    3. Applied *-un-lft-identity 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}{1 \cdot \left(\left(-b\right) - \sqrt{{b}^2 - 4 \cdot \left(a \cdot c\right)}\right)}}{2 \cdot a}\]
      11.0
    4. Applied times-frac to get
      \[\color{red}{\frac{1 \cdot \left(\left(-b\right) - \sqrt{{b}^2 - 4 \cdot \left(a \cdot c\right)}\right)}{2 \cdot a}} \leadsto \color{blue}{\frac{1}{2} \cdot \frac{\left(-b\right) - \sqrt{{b}^2 - 4 \cdot \left(a \cdot c\right)}}{a}}\]
      11.0

    if 2.7032921376893094e+83 < b

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