In this paper, we consider how to accurately solve the nonsymmetric eigenvalue problem for a class of generalized sign regular matrices including extremely ill-conditioned quasi-Cauchy and quasi-Vandermonde matrices. The problem of performing accurate computations with structured matrices is very much a representation problem. We first develop a relatively robust representation (RRR) for this class of matrices by introducing a free parameter, which exceeds an essential threshold, into an indefinite factorization. We then design a new $$O(n^{3})$$ algorithm to compute all the eigenvalues of such matrices with high relative accuracy, as warranted by the RRR. Error analysis and numerical experiments are performed to illustrate the high relative accuracy.