The fiscal first-quarter numbers announced Thursday topped what the slumping personal computer maker's own management and stock market analysts had forecast.

Like other PC makers, HP has been struggling to adapt to a shift toward smartphones and tablet computers, which are siphoning sales from desktop and laptop machines made by HP and other companies. Adding to the problems were some acquisitions gone awry. Over the past two quarters, HP announced losses totaling $15.3 billion as the company accounted for those mishaps, to the shock of Wall Street. The jolt caused HP's stock to plunge to its lowest price in a decade just three months ago.

The shares have rebounded since then, though they still remain about 20 percent below where they were in Sept. 2011, when the company fired Leo Apotheker as its CEO and hired Meg Whitman, who became a high-tech star while running eBay Inc.'s online marketplace.

The same problems are still plaguing HP, but signs of progress in the latest quarter indicated that the company's turnaround efforts are running ahead of schedule. Whitman has consistently said it may be several years before HP is on solid ground again.

She said the company is in the best condition since she was hired as CEO. "The patient showed some improvement," Whitman told The Associated Press in a Thursday interview.

She stopped short of predicting HP will be fully cured more quickly than she anticipated. "I don't want to get out over my skis." Whitman said.

In a show of confidence, HP provided an earnings forecast for the Feb.-April quarter that was higher than analysts' projections.

The company's stock rose 94 cents, or 5.5 percent, to $18.04 in after-hours trading. At its recent low, the stock was down to $11.35.

HP earned $1.2 billion, or 63 cents per share, in the three months ending Jan. 31. That was a 16 percent decrease from nearly $1.5 billion, or 73 cents per share, at the same time a year earlier.

Excluding certain accounting items, HP would have earned 82 cents per share. That was well above the average estimate of 71 cents per share among analysts surveyed by FactSet.

Revenue fell 6 percent to $28.4 billion, about $470 million above analysts' projections. It was nearly $30 billion a year earlier. It's the sixth consecutive quarter that HP's revenue has dropped from the previous year.

Excluding one-time items, HP expects to earn 80 to 82 cents per share in the current quarter. Analysts estimated earnings of 77 cents per share.