What a difference a year makes -- or even a quarter. A.O. Smith (NYSE:AOS), a diversified manufacturer of small motors and water heaters, saw its stock rise almost 10% Friday as investors reacted favorably to third-quarter earnings.

For the quarter, sales climbed more than 4% as softer electrical motor sales were offset by double-digit growth in the water-heater business. Perhaps even more importantly, margins expanded nicely, particularly in the latter sector. Reported quarterly earnings more than tripled year over year, and that included a $2 million charge relating to some restructuring items.

Though second-quarter performance was hurt by a buildup in wholesaler water-heater inventories, that business has started to return to normal. The commercial business is still tough, but the retail line is improving, and sales grew 50% in the company's Chinese operations. To put this in context, though, Chinese water-heater revenue represents about 10% of the company's water-heater business, and 5% of its overall revenue.

Looking at cash flow, it's pretty clear that the company's efforts to improve its working capital utilization are paying off. Free cash flow totaled more than 8% of sales for the trailing nine months, and while I doubt that the company can duplicate its 400% year-to-date operating cash flow increase in the future, I do believe it's managing working capital better. Interestingly, the company's structural free cash flow is down about 5% year over year.

Big changes are apparently afoot for the company. It's committed to investing in the fast-growing Chinese market, and it's about to absorb GSW (and its large business with Lowe's (NYSE:LOW)). Investors should realize, though, that the management team will be changing at year-end as the company's 13-year CEO concludes his tenure.

While I think A.O. Smith will likely continue to improve, my cash flow analysis suggests that the stock is only about 10% undervalued right now. That's not quite enough of a margin of safety to entice me to buy, but it certainly isn't a compelling reason to sell, either.

For more related Foolishness:

Fool contributor Stephen Simpson has no financial interest in any stocks mentioned (that means he's neither long nor short the shares).