Hewlett-Packard Company (HPQ -0.43%) reported solid first-quarter results last week, including the first increase in non-GAAP EPS since 2011. In constant currency, revenue also increased for the first time since 2011.

Despite HP's improving trajectory, the company still isn't getting much respect from investors. HP shares trade for just 8 times earnings -- about half the average for the broader market. By contrast, Cisco Systems (CSCO -0.09%) and International Business Machines (IBM 1.39%) -- two competitors that have posted even weaker results lately -- trade for 10-11 times earnings.

Considering HP's bargain valuation coming into earnings, it was even more surprising to see the stock decline after HP released a good earnings report. With several of its key businesses starting to improve now, HP looks like a solid buy for long-term investors.

A big step in the recovery process
HP's recent earnings report showed that the company's three largest segments by revenue -- Personal Systems, Printing, and the Enterprise Group (servers, storage, networking, and related services) -- are all making good progress. The Enterprise Services business continues to face the biggest challenges, but HP executives expect significant improvement as the year progresses. Lastly, the relatively small software segment delivered a mixed performance.

Surprisingly, HP posted a 4% revenue increase in the Personal Systems segment. (Both major PC market research firms had projected that HP's PC sales fell in the fourth quarter of 2013.) Furthermore, HP managed to boost PC sales without sacrificing margins.

HP actually saw growth in PC sales last quarter.

HP's Enterprise Group also delivered a second straight quarter of revenue growth. Pre-tax profit fell 6% because of margin contraction, primarily because of unfavorable mix. However, this was an improvement over the prior quarter, when pre-tax profit fell 10% despite top-line growth. CEO Meg Whitman expects margins to improve going forward because of cost cuts and the growth of HP's higher-margin converged storage and networking products.

HP printer unit sales grew for the third consecutive quarter.

In the printing segment, revenue declined 2%, but this was primarily due to price deflation (which was offset by lower costs). HP's printer unit sales increased for the third straight quarter, this time by 5%. Long term, the increase in printer unit sales should drive increased sales of high-margin HP ink and toner. While printing is not a long-term growth business, the bear argument that printing is about to disappear has not been borne out either.

Causes for concern?
Offsetting the relatively good performances in these three divisions was the enterprise services business. For that segment, revenue fell 7%, and pre-tax margin contracted to just 1% because of the loss of a key customer (which had been expected).

However, HP's management still expects a 3.5%-4.5% segment margin for the full year, which would herald significant improvements in the next few quarters. If those gains materialize, it should help investors become more comfortable with HP's prospects.

HP bears also pointed out that while HP's revenue and EPS beat the average analyst estimates, the revenue gains came from the low-margin PC business and the EPS upside came from one-time items. The favorable one-time items included sales of real estate and intellectual property.

Good by comparison
While there were definitely pockets of weakness in HP's results, the company's performance looks quite good by comparison to IBM and Cisco. Whereas HP posted revenue growth in the Enterprise Group (which competes with Cisco), Cisco's revenue and adjusted EPS both declined 8% last quarter. Cisco is projecting a similar decline this quarter.

IBM has also confronted significant revenue declines recently. Revenue fell 5% in Q4 of 2013, as well as for the full year. Pre-tax earnings fell 11% last quarter, although IBM is projecting that adjusted EPS will grow more than 10% in 2014.

That said, IBM's EPS growth has been driven primarily by debt-financed share buybacks. The company's long-term debt has soared from just under $23 billion at the end of 2011 to nearly $33 billion by the end of last year.

That's not necessarily a bad thing, but over the same time period, HP has significantly improved its balance sheet. Moreover, HP has fairly consistently outperformed its own cash flow guidance in the last year and a half. This gives HP more flexibility to ramp up its own buybacks in the future to boost EPS.

Foolish bottom line
While the printing segment was the only part of HP's business to show improvements last year, the company's other hardware businesses are now starting to turn the corner. HP still has plenty of work to do, but management's success thus far should give investors confidence that the turnaround plan is sound.

Considering HP's competitors are having just as much trouble (or more), HP should be getting kudos for its turnaround efforts. Instead, shares remain stuck around $30. However, if HP continues to post profit growth over the next several quarters while moving to return more cash to shareholders, the stock should start heading toward the $40 mark.