Due to the rotary axes of the machine, the tool path between two blocks in the NC program will drive the pivot move non-linearly relative to the workpiece, reducing the accuracy of the tool path. Linearization of the tool path in the postprocessor will solve the problem. An algorithm will be proposed to modify the exact inverse kinematics in order to give robustness to singularities at the least cost of tool orientation deviation. The kinematics of a five-axis machine with virtual C-axis rotary axes is analyzed. Applying forward kinematics will lead to a closed form solution of the inverse kinematics is presented. Due to the singular configuration problem may cause large machining error, generating smooth tool trajectories crossing neighborhood of singular points.