Average Error: 28.7 → 0.4
Time: 54.7min
Precision: binary64
\[1.05367121277235087 \cdot 10^{-8} \lt a \lt 94906265.6242515594 \land 1.05367121277235087 \cdot 10^{-8} \lt b \lt 94906265.6242515594 \land 1.05367121277235087 \cdot 10^{-8} \lt c \lt 94906265.6242515594\]
\[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}\]
\[c \cdot \frac{-1}{\sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)} + b}\]

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(3 \cdot a\right) \cdot c}}{3 \cdot a}\]
  2. Simplified28.7

    \[\leadsto \color{blue}{\frac{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} - b}{3 \cdot a}}\]
  3. Using strategy rm
  4. Applied flip--28.7

    \[\leadsto \frac{\color{blue}{\frac{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} \cdot \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} - b \cdot b}{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} + b}}}{3 \cdot a}\]
  5. Simplified0.4

    \[\leadsto \frac{\frac{\color{blue}{-\left(3 \cdot a\right) \cdot c}}{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} + b}}{3 \cdot a}\]
  6. Using strategy rm
  7. Applied *-un-lft-identity0.4

    \[\leadsto \frac{\frac{-\left(3 \cdot a\right) \cdot c}{\color{blue}{1 \cdot \left(\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} + b\right)}}}{3 \cdot a}\]
  8. Applied distribute-lft-neg-in0.4

    \[\leadsto \frac{\frac{\color{blue}{\left(-3 \cdot a\right) \cdot c}}{1 \cdot \left(\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} + b\right)}}{3 \cdot a}\]
  9. Applied times-frac0.3

    \[\leadsto \frac{\color{blue}{\frac{-3 \cdot a}{1} \cdot \frac{c}{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} + b}}}{3 \cdot a}\]
  10. Applied associate-/l*0.3

    \[\leadsto \color{blue}{\frac{\frac{-3 \cdot a}{1}}{\frac{3 \cdot a}{\frac{c}{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} + b}}}}\]
  11. Using strategy rm
  12. Applied div-inv0.4

    \[\leadsto \frac{\frac{-3 \cdot a}{1}}{\frac{3 \cdot a}{\color{blue}{c \cdot \frac{1}{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} + b}}}}\]
  13. Applied times-frac0.6

    \[\leadsto \frac{\frac{-3 \cdot a}{1}}{\color{blue}{\frac{3}{c} \cdot \frac{a}{\frac{1}{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} + b}}}}\]
  14. Applied add-cube-cbrt0.6

    \[\leadsto \frac{\frac{-3 \cdot a}{\color{blue}{\left(\sqrt[3]{1} \cdot \sqrt[3]{1}\right) \cdot \sqrt[3]{1}}}}{\frac{3}{c} \cdot \frac{a}{\frac{1}{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} + b}}}\]
  15. Applied distribute-rgt-neg-in0.6

    \[\leadsto \frac{\frac{\color{blue}{3 \cdot \left(-a\right)}}{\left(\sqrt[3]{1} \cdot \sqrt[3]{1}\right) \cdot \sqrt[3]{1}}}{\frac{3}{c} \cdot \frac{a}{\frac{1}{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} + b}}}\]
  16. Applied times-frac0.6

    \[\leadsto \frac{\color{blue}{\frac{3}{\sqrt[3]{1} \cdot \sqrt[3]{1}} \cdot \frac{-a}{\sqrt[3]{1}}}}{\frac{3}{c} \cdot \frac{a}{\frac{1}{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} + b}}}\]
  17. Applied times-frac0.5

    \[\leadsto \color{blue}{\frac{\frac{3}{\sqrt[3]{1} \cdot \sqrt[3]{1}}}{\frac{3}{c}} \cdot \frac{\frac{-a}{\sqrt[3]{1}}}{\frac{a}{\frac{1}{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} + b}}}}\]
  18. Simplified0.4

    \[\leadsto \color{blue}{c} \cdot \frac{\frac{-a}{\sqrt[3]{1}}}{\frac{a}{\frac{1}{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} + b}}}\]
  19. Simplified0.4

    \[\leadsto c \cdot \color{blue}{\frac{-1}{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} + b}}\]
  20. Using strategy rm
  21. Applied associate-*l*0.4

    \[\leadsto c \cdot \frac{-1}{\sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}} + b}\]
  22. Final simplification0.4

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

Reproduce

herbie shell --seed 2020181 
(FPCore (a b c)
  :name "Cubic critical, narrow range"
  :precision binary64
  :pre (and (< 1.0536712127723509e-08 a 94906265.62425156) (< 1.0536712127723509e-08 b 94906265.62425156) (< 1.0536712127723509e-08 c 94906265.62425156))
  (/ (+ (neg b) (sqrt (- (* b b) (* (* 3.0 a) c)))) (* 3.0 a)))