\[\frac{\left(-b\right) + \sqrt{{b}^2 - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\]
Test:
The quadratic formula (r1)
Bits:
128 bits
Bits error versus a
Bits error versus b
Bits error versus c
Time: 10.8 s
Input Error: 15.8
Output Error: 15.8
Log:
Profile: 🕒
\(\frac{1}{2} \cdot \frac{\left(-b\right) + \sqrt{{b}^2 - a \cdot \left(c \cdot 4\right)}}{a}\)
  1. Started with
    \[\frac{\left(-b\right) + \sqrt{{b}^2 - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\]
    15.8
  2. Using strategy rm
    15.8
  3. Applied pow1 to get
    \[\frac{\color{red}{\left(-b\right) + \sqrt{{b}^2 - \left(4 \cdot a\right) \cdot c}}}{2 \cdot a} \leadsto \frac{\color{blue}{{\left(\left(-b\right) + \sqrt{{b}^2 - \left(4 \cdot a\right) \cdot c}\right)}^{1}}}{2 \cdot a}\]
    15.8
  4. Using strategy rm
    15.8
  5. Applied *-un-lft-identity to get
    \[\frac{{\color{red}{\left(\left(-b\right) + \sqrt{{b}^2 - \left(4 \cdot a\right) \cdot c}\right)}}^{1}}{2 \cdot a} \leadsto \frac{{\color{blue}{\left(1 \cdot \left(\left(-b\right) + \sqrt{{b}^2 - \left(4 \cdot a\right) \cdot c}\right)\right)}}^{1}}{2 \cdot a}\]
    15.8
  6. Applied unpow-prod-down to get
    \[\frac{\color{red}{{\left(1 \cdot \left(\left(-b\right) + \sqrt{{b}^2 - \left(4 \cdot a\right) \cdot c}\right)\right)}^{1}}}{2 \cdot a} \leadsto \frac{\color{blue}{{1}^{1} \cdot {\left(\left(-b\right) + \sqrt{{b}^2 - \left(4 \cdot a\right) \cdot c}\right)}^{1}}}{2 \cdot a}\]
    15.8
  7. Applied times-frac to get
    \[\color{red}{\frac{{1}^{1} \cdot {\left(\left(-b\right) + \sqrt{{b}^2 - \left(4 \cdot a\right) \cdot c}\right)}^{1}}{2 \cdot a}} \leadsto \color{blue}{\frac{{1}^{1}}{2} \cdot \frac{{\left(\left(-b\right) + \sqrt{{b}^2 - \left(4 \cdot a\right) \cdot c}\right)}^{1}}{a}}\]
    15.8
  8. Applied simplify to get
    \[\color{red}{\frac{{1}^{1}}{2}} \cdot \frac{{\left(\left(-b\right) + \sqrt{{b}^2 - \left(4 \cdot a\right) \cdot c}\right)}^{1}}{a} \leadsto \color{blue}{\frac{1}{2}} \cdot \frac{{\left(\left(-b\right) + \sqrt{{b}^2 - \left(4 \cdot a\right) \cdot c}\right)}^{1}}{a}\]
    15.8
  9. Applied simplify to get
    \[\frac{1}{2} \cdot \color{red}{\frac{{\left(\left(-b\right) + \sqrt{{b}^2 - \left(4 \cdot a\right) \cdot c}\right)}^{1}}{a}} \leadsto \frac{1}{2} \cdot \color{blue}{\frac{\left(-b\right) + \sqrt{{b}^2 - a \cdot \left(c \cdot 4\right)}}{a}}\]
    15.8

Original test:


(lambda ((a default) (b default) (c default))
  #:name "The quadratic formula (r1)"
  (/ (+ (- b) (sqrt (- (sqr b) (* (* 4 a) c)))) (* 2 a))
  #:target
  (if (< b 0) (/ (+ (- b) (sqrt (- (sqr b) (* (* 4 a) c)))) (* 2 a)) (/ c (* a (/ (- (- b) (sqrt (- (sqr b) (* (* 4 a) c)))) (* 2 a))))))