Average Error: 28.7 → 29.0
Time: 27.1s
Precision: 64
Internal Precision: 128
\[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\]
\[\frac{\sqrt[3]{\frac{(\left(\sqrt{\sqrt{(c \cdot \left(a \cdot -4\right) + \left(b \cdot b\right))_*}}\right) \cdot \left(\sqrt{\sqrt{(c \cdot \left(a \cdot -4\right) + \left(b \cdot b\right))_*}}\right) + \left(-b\right))_*}{2}} \cdot \sqrt[3]{\frac{(\left(\sqrt{\sqrt{(c \cdot \left(a \cdot -4\right) + \left(b \cdot b\right))_*}}\right) \cdot \left(\sqrt{\sqrt{(c \cdot \left(a \cdot -4\right) + \left(b \cdot b\right))_*}}\right) + \left(-b\right))_*}{2}}}{\frac{a}{\sqrt[3]{\frac{1}{2}} \cdot \sqrt[3]{(\left(\sqrt{\sqrt{(c \cdot \left(a \cdot -4\right) + \left(b \cdot b\right))_*}}\right) \cdot \left(\sqrt{\sqrt{(c \cdot \left(a \cdot -4\right) + \left(b \cdot b\right))_*}}\right) + \left(-b\right))_*}}}\]

Error

Bits error versus a

Bits error versus b

Bits error versus c

Derivation

  1. Initial program 28.7

    \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\]
  2. Simplified28.7

    \[\leadsto \color{blue}{\frac{\frac{\sqrt{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*} - b}{2}}{a}}\]
  3. Using strategy rm
  4. Applied add-sqr-sqrt29.4

    \[\leadsto \frac{\frac{\color{blue}{\sqrt{\sqrt{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}} \cdot \sqrt{\sqrt{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}}} - b}{2}}{a}\]
  5. Applied fma-neg29.0

    \[\leadsto \frac{\frac{\color{blue}{(\left(\sqrt{\sqrt{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}}\right) \cdot \left(\sqrt{\sqrt{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}}\right) + \left(-b\right))_*}}{2}}{a}\]
  6. Using strategy rm
  7. Applied add-cube-cbrt29.0

    \[\leadsto \frac{\color{blue}{\left(\sqrt[3]{\frac{(\left(\sqrt{\sqrt{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}}\right) \cdot \left(\sqrt{\sqrt{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}}\right) + \left(-b\right))_*}{2}} \cdot \sqrt[3]{\frac{(\left(\sqrt{\sqrt{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}}\right) \cdot \left(\sqrt{\sqrt{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}}\right) + \left(-b\right))_*}{2}}\right) \cdot \sqrt[3]{\frac{(\left(\sqrt{\sqrt{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}}\right) \cdot \left(\sqrt{\sqrt{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}}\right) + \left(-b\right))_*}{2}}}}{a}\]
  8. Applied associate-/l*29.0

    \[\leadsto \color{blue}{\frac{\sqrt[3]{\frac{(\left(\sqrt{\sqrt{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}}\right) \cdot \left(\sqrt{\sqrt{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}}\right) + \left(-b\right))_*}{2}} \cdot \sqrt[3]{\frac{(\left(\sqrt{\sqrt{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}}\right) \cdot \left(\sqrt{\sqrt{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}}\right) + \left(-b\right))_*}{2}}}{\frac{a}{\sqrt[3]{\frac{(\left(\sqrt{\sqrt{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}}\right) \cdot \left(\sqrt{\sqrt{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}}\right) + \left(-b\right))_*}{2}}}}}\]
  9. Using strategy rm
  10. Applied div-inv29.0

    \[\leadsto \frac{\sqrt[3]{\frac{(\left(\sqrt{\sqrt{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}}\right) \cdot \left(\sqrt{\sqrt{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}}\right) + \left(-b\right))_*}{2}} \cdot \sqrt[3]{\frac{(\left(\sqrt{\sqrt{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}}\right) \cdot \left(\sqrt{\sqrt{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}}\right) + \left(-b\right))_*}{2}}}{\frac{a}{\sqrt[3]{\color{blue}{(\left(\sqrt{\sqrt{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}}\right) \cdot \left(\sqrt{\sqrt{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}}\right) + \left(-b\right))_* \cdot \frac{1}{2}}}}}\]
  11. Applied cbrt-prod29.0

    \[\leadsto \frac{\sqrt[3]{\frac{(\left(\sqrt{\sqrt{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}}\right) \cdot \left(\sqrt{\sqrt{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}}\right) + \left(-b\right))_*}{2}} \cdot \sqrt[3]{\frac{(\left(\sqrt{\sqrt{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}}\right) \cdot \left(\sqrt{\sqrt{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}}\right) + \left(-b\right))_*}{2}}}{\frac{a}{\color{blue}{\sqrt[3]{(\left(\sqrt{\sqrt{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}}\right) \cdot \left(\sqrt{\sqrt{(c \cdot \left(-4 \cdot a\right) + \left(b \cdot b\right))_*}}\right) + \left(-b\right))_*} \cdot \sqrt[3]{\frac{1}{2}}}}}\]
  12. Final simplification29.0

    \[\leadsto \frac{\sqrt[3]{\frac{(\left(\sqrt{\sqrt{(c \cdot \left(a \cdot -4\right) + \left(b \cdot b\right))_*}}\right) \cdot \left(\sqrt{\sqrt{(c \cdot \left(a \cdot -4\right) + \left(b \cdot b\right))_*}}\right) + \left(-b\right))_*}{2}} \cdot \sqrt[3]{\frac{(\left(\sqrt{\sqrt{(c \cdot \left(a \cdot -4\right) + \left(b \cdot b\right))_*}}\right) \cdot \left(\sqrt{\sqrt{(c \cdot \left(a \cdot -4\right) + \left(b \cdot b\right))_*}}\right) + \left(-b\right))_*}{2}}}{\frac{a}{\sqrt[3]{\frac{1}{2}} \cdot \sqrt[3]{(\left(\sqrt{\sqrt{(c \cdot \left(a \cdot -4\right) + \left(b \cdot b\right))_*}}\right) \cdot \left(\sqrt{\sqrt{(c \cdot \left(a \cdot -4\right) + \left(b \cdot b\right))_*}}\right) + \left(-b\right))_*}}}\]

Reproduce

herbie shell --seed 2019053 +o rules:numerics
(FPCore (a b c)
  :name "Quadratic roots, narrow range"
  :pre (and (< 1.0536712127723509e-08 a 94906265.62425156) (< 1.0536712127723509e-08 b 94906265.62425156) (< 1.0536712127723509e-08 c 94906265.62425156))
  (/ (+ (- b) (sqrt (- (* b b) (* (* 4 a) c)))) (* 2 a)))