Compensation of tool position as function of square of rotating speed of spindle