Average Error: 52.1 → 0.1
Time: 4.8s
Precision: binary64
\[4.93038 \cdot 10^{-32} \lt a \lt 2.02824 \cdot 10^{31} \land 4.93038 \cdot 10^{-32} \lt b \lt 2.02824 \cdot 10^{31} \land 4.93038 \cdot 10^{-32} \lt c \lt 2.02824 \cdot 10^{31}\]
\[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}\]
\[\frac{c}{\left(-b\right) - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}\]

Error

Bits error versus a

Bits error versus b

Bits error versus c

Derivation

  1. Initial program 52.1

    \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}\]
  2. Using strategy rm
  3. Applied flip-+52.1

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

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

    \[\leadsto \frac{\frac{0 + 3 \cdot \left(a \cdot c\right)}{\color{blue}{1 \cdot \left(\left(-b\right) - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}}}{3 \cdot a}\]
  7. Applied *-un-lft-identity0.5

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

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

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

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

    \[\leadsto \frac{1}{3} \cdot \color{blue}{\frac{3 \cdot \left(a \cdot c\right)}{a \cdot \left(\left(-b\right) - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}}\]
  12. Using strategy rm
  13. Applied pow10.6

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

    \[\leadsto \color{blue}{{\left(\frac{1}{3}\right)}^{1}} \cdot {\left(\frac{3 \cdot \left(a \cdot c\right)}{a \cdot \left(\left(-b\right) - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}\right)}^{1}\]
  15. Applied pow-prod-down0.6

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

    \[\leadsto {\color{blue}{\left(\frac{1}{\frac{1 \cdot \left(\left(-b\right) - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}{c}}\right)}}^{1}\]
  17. Using strategy rm
  18. Applied *-un-lft-identity0.3

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

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

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

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

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

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

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

Reproduce

herbie shell --seed 2020171 
(FPCore (a b c)
  :name "Cubic critical, wide range"
  :precision binary64
  :pre (and (< 4.930380657631324e-32 a 2.028240960365167e+31) (< 4.930380657631324e-32 b 2.028240960365167e+31) (< 4.930380657631324e-32 c 2.028240960365167e+31))
  (/ (+ (neg b) (sqrt (- (* b b) (* (* 3.0 a) c)))) (* 3.0 a)))