For space-times in general relativity, the Petrov classification of the Weyl conformal curvature and the Plebanski or Segre classification of the Ricci tensor each depend on the properties of the roots of quartic equations. The coefficients in these quartic equations are in general complicated functions of the space-time coordinates. We review the general theory of quartic equations, and discuss algorithms for determining the existence and values of multiple roots. We consider practical implementation of an algorithm and the consequent Petrov classification. Tests of programs embodying this algorithm, using the computer algebra system CLASSI based on SHEEP, are reported.