Average Error: 43.6 → 6.1
Time: 45.0s
Precision: 64
Internal Precision: 128
\[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}\]
\[\frac{(\frac{-9}{2} \cdot \left(\left(c \cdot a\right) \cdot b\right) + \left(\frac{27}{8} \cdot \frac{\left(c \cdot a\right) \cdot \left(c \cdot a\right)}{b}\right))_*}{\left(3 \cdot a\right) \cdot \left(\sqrt{(-3 \cdot \left(c \cdot a\right) + \left(b \cdot b\right))_*} \cdot \sqrt{(-3 \cdot \left(c \cdot a\right) + \left(b \cdot b\right))_*} + \left(b \cdot \sqrt{(-3 \cdot \left(c \cdot a\right) + \left(b \cdot b\right))_*} + b \cdot b\right)\right)}\]

Error

Bits error versus a

Bits error versus b

Bits error versus c

Bits error versus d

Derivation

  1. Initial program 43.6

    \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}\]
  2. Simplified43.6

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

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

    \[\leadsto \color{blue}{\frac{{\left(\sqrt{(-3 \cdot \left(c \cdot a\right) + \left(b \cdot b\right))_*}\right)}^{3} - {b}^{3}}{\left(3 \cdot a\right) \cdot \left(\sqrt{(-3 \cdot \left(c \cdot a\right) + \left(b \cdot b\right))_*} \cdot \sqrt{(-3 \cdot \left(c \cdot a\right) + \left(b \cdot b\right))_*} + \left(b \cdot b + \sqrt{(-3 \cdot \left(c \cdot a\right) + \left(b \cdot b\right))_*} \cdot b\right)\right)}}\]
  6. Simplified43.3

    \[\leadsto \frac{\color{blue}{\sqrt{(b \cdot b + \left(a \cdot \left(-3 \cdot c\right)\right))_*} \cdot (b \cdot b + \left(a \cdot \left(-3 \cdot c\right)\right))_* - b \cdot \left(b \cdot b\right)}}{\left(3 \cdot a\right) \cdot \left(\sqrt{(-3 \cdot \left(c \cdot a\right) + \left(b \cdot b\right))_*} \cdot \sqrt{(-3 \cdot \left(c \cdot a\right) + \left(b \cdot b\right))_*} + \left(b \cdot b + \sqrt{(-3 \cdot \left(c \cdot a\right) + \left(b \cdot b\right))_*} \cdot b\right)\right)}\]
  7. Taylor expanded around inf 6.1

    \[\leadsto \frac{\color{blue}{\frac{27}{8} \cdot \frac{{a}^{2} \cdot {c}^{2}}{b} - \frac{9}{2} \cdot \left(a \cdot \left(b \cdot c\right)\right)}}{\left(3 \cdot a\right) \cdot \left(\sqrt{(-3 \cdot \left(c \cdot a\right) + \left(b \cdot b\right))_*} \cdot \sqrt{(-3 \cdot \left(c \cdot a\right) + \left(b \cdot b\right))_*} + \left(b \cdot b + \sqrt{(-3 \cdot \left(c \cdot a\right) + \left(b \cdot b\right))_*} \cdot b\right)\right)}\]
  8. Simplified6.1

    \[\leadsto \frac{\color{blue}{(\frac{-9}{2} \cdot \left(\left(a \cdot c\right) \cdot b\right) + \left(\frac{27}{8} \cdot \frac{\left(a \cdot c\right) \cdot \left(a \cdot c\right)}{b}\right))_*}}{\left(3 \cdot a\right) \cdot \left(\sqrt{(-3 \cdot \left(c \cdot a\right) + \left(b \cdot b\right))_*} \cdot \sqrt{(-3 \cdot \left(c \cdot a\right) + \left(b \cdot b\right))_*} + \left(b \cdot b + \sqrt{(-3 \cdot \left(c \cdot a\right) + \left(b \cdot b\right))_*} \cdot b\right)\right)}\]
  9. Final simplification6.1

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

Reproduce

herbie shell --seed 2019094 +o rules:numerics
(FPCore (a b c d)
  :name "Cubic critical, medium range"
  :pre (and (< 1.1102230246251565e-16 a 9007199254740992.0) (< 1.1102230246251565e-16 b 9007199254740992.0) (< 1.1102230246251565e-16 c 9007199254740992.0))
  (/ (+ (- b) (sqrt (- (* b b) (* (* 3 a) c)))) (* 3 a)))