A compensation algorithm with accurate interpolation is proposed for the nonlinear error problem in the post-processing of existing five-axis AC double rotary table CNC machines.The inverse solution of machine motion is realized by using the homogeneous transformation matrix,and the multi-solution screening is performed by using the rotation amount minimization method.Exact vector interpolation is used for non-singular nonlinear errors,and exact linear interpolation is applied for singular nonlinear errors to precisely control the new nonlinear errors generated by each interpolation between 95%and 100%of the target value.Simulations show that the method can effectively control the error accuracy.And the experimental results of surface part machining show that the proposed method,in comparison with the traditional midpoint iterative interpolation one,can reduce the amount of NC data by 18%and the machining time by 13.7%and improve the cutting force and surface roughness as well.