def diop_ternary_quadratic(eq):
 (var, coeff, diop_type) = classify_diop(eq, _dict=False)
 if (diop_type in ('homogeneous_ternary_quadratic', 'homogeneous_ternary_quadratic_normal')):
  return _diop_ternary_quadratic(var, coeff)

def diop_ternary_quadratic ( eq ) : ( var , coeff , diop_type ) = classify_diop ( eq , _dict = False ) if ( diop_type in ( 'homogeneous_ternary_quadratic' , 'homogeneous_ternary_quadratic_normal' ) ) : return _diop_ternary_quadratic ( var , coeff )
solves the general quadratic ternary form .