Hewlett-Packard Co.’s first-quarter results provided a glimmer of hope after months of gloomy news, topping forecasts of the company and analysts. Over the past two quarters, HP had lost $15.3 billion as it accounted for some mishaps. But the latest results show HP’s turnaround efforts are running ahead of schedule. HP earned $1.2 billion, or 63 cents per share. That was a 16 percent decrease from nearly $1.5 billion, or 73 cents, a year earlier. Excluding some items, HP would have earned 82 cents per share. Analysts had estimated 71 cents per share on average.