1. A method of operating a multi-axis machine, the method comprising: monitoring a kinematic linkage of the machine to detect an approach by one or more joints of the linkage toward singularity, the monitoring performed using a manipulator matrix; determining a degree n of the approached singularity; identifying the one or more joints approaching singularity; obtaining n virtual joints; replacing the one or more identified joints with the virtual joints in the manipulator matrix to modify the manipulator matrix; and using the modified manipulator matrix to determine position changes for links of the linkage.