For CNC machines governed by typical feedback controllers, the problem of compensating for inertia and damping of the machine axes is solved by a priori modifications to the commanded path geometry. Standard second-order models of axis dynamics are expressed in terms of the path parameter ξ rather than the time t as independent variable, incurring ordinary differential equations with polynomial coefficients. For a commanded path specified as a Pythagorean-hodograph curve R(ξ) and a P controller, a modified path \(\hat{\bf R}(\xi)\) can be determined as a rational Bézier curve, that precisely compensates for the axis inertia and damping, and thus (theoretically) achieves zero contour error. For PI, PID, or P–PI controllers, exact closed-form solutions for \(\hat{\bf R}(\xi)\) are no longer possible, but polynomial approximations may be computed in the numerically stable Bernstein basis on ξ ∈ [ 0,1 ]. The inverse-dynamics path modification procedure is applicable to both constant feedrates and variable feedrates defined by polynomial functions V(ξ) of the curve parameter. The method is described in the general context of PID controllers, and its implementation is then demonstrated for both P and PI controllers, governing motion along paths with extreme variations of curvature and/or parametric speed.