Numerical calculation of hypersonic flow by the spectral method