Our Greek Septuagint source text says that David took the conquered Ammonite people and had them sawed in half with saws, axes, and threshing devices. However, the parallel account in 2 Samuel 12:31 says no such thing, it says that they were put to work in jobs that both used and creating iron tools (carpenters, farm laborers, iron smelters, blacksmiths, and brick makers).
The problem seems to be in the original Hebrew source used by our Greek translator. The Pulpit Commentary reports that there was a simple copying error of just part of one letter:
Hebrew word וַיָּשַׂר (and he cut) instead of וַיָּשֶׂם (he put). Probably it is nowhere else used in the sense of "cutting," if it is here. Its ordinary sense is to rule or put into subjection.
So the two accounts do not contradict each other, and King David did not administer a cruel and medieval punishment upon the conquered people. On the contrary, they were put to work using saws, axes, and farm tools for threshing grain.
Our Bible uses older manuscripts than most Bibles do. Check us out!