\[\frac{\left(-b\right) - \sqrt{{b}^2 - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\]
Test:
The quadratic formula (r2)
Bits:
128 bits
Bits error versus a
Bits error versus b
Bits error versus c
Time: 12.1 s
Input Error: 16.0
Output Error: 16.0
Log:
Profile: 🕒
\(\frac{\left(-b\right) - \sqrt{{b}^2 - \left(4 \cdot a\right) \cdot c}}{a \cdot 2}\)
  1. Started with
    \[\frac{\left(-b\right) - \sqrt{{b}^2 - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\]
    16.0
  2. Using strategy rm
    16.0
  3. Applied add-cube-cbrt to get
    \[\frac{\left(-b\right) - \color{red}{\sqrt{{b}^2 - 4 \cdot \left(a \cdot c\right)}}}{2 \cdot a} \leadsto \frac{\left(-b\right) - \color{blue}{{\left(\sqrt[3]{\sqrt{{b}^2 - 4 \cdot \left(a \cdot c\right)}}\right)}^3}}{2 \cdot a}\]
    16.8
  4. Applied taylor to get
    \[\frac{\left(-b\right) - {\left(\sqrt[3]{\sqrt{{b}^2 - 4 \cdot \left(a \cdot c\right)}}\right)}^3}{2 \cdot a} \leadsto \frac{\left(-b\right) - {\left(\sqrt[3]{\sqrt{{b}^2 - 4 \cdot \left(c \cdot a\right)}}\right)}^3}{2 \cdot a}\]
    16.8
  5. Taylor expanded around 0 to get
    \[\frac{\left(-b\right) - {\left(\sqrt[3]{\sqrt{\color{red}{{b}^2 - 4 \cdot \left(c \cdot a\right)}}}\right)}^3}{2 \cdot a} \leadsto \frac{\left(-b\right) - {\left(\sqrt[3]{\sqrt{\color{blue}{{b}^2 - 4 \cdot \left(c \cdot a\right)}}}\right)}^3}{2 \cdot a}\]
    16.8
  6. Applied simplify to get
    \[\color{red}{\frac{\left(-b\right) - {\left(\sqrt[3]{\sqrt{{b}^2 - 4 \cdot \left(c \cdot a\right)}}\right)}^3}{2 \cdot a}} \leadsto \color{blue}{\frac{\left(-b\right) - \sqrt{{b}^2 - \left(4 \cdot a\right) \cdot c}}{a \cdot 2}}\]
    16.0

Original test:


(lambda ((a default) (b default) (c default))
  #:name "The quadratic formula (r2)"
  (/ (- (- 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))))