::::I think that section is not user-friendly at all. If I see it right, the cases p=0/q=0 are not handled. The cosh/sinh formulas can be used to create the complex solutions too, without complex algebra: Drop factor "-2", then for p<0 cosh(...)±I*sqrt(3)*sinh(...) and for p>0 sinh(...)±I*sqrt(3)*cosh(...). Arguments for sinh/cosh the same as stated for the real solutions in the article.