Stocks ended mixed on Thursday, with strength in financial and certain technology shares helping the Dow erase losses and the Nasdaq recover from bigger declines. Stocks had been lower through most of the session as investors considered weaker quarterly results from Merrill Lynch, a steep decline in a key manufacturing index, and oil and gasoline prices near record highs. Merrill Lynch became the latest financial-services firm to report a steep loss, due largely to a big write-down related to bad mortgage investments. Merrill also said it will cut thousands of jobs. However, after falling in the early morning, its shares turned higher. Financial stocks rebounded in the afternoon as investors reacted positively to reports that Citigroup is planning to cut its cost base by up to 20 percent. The sector also benefited from reports that Freddie Mac has confirmed it will buy mortgages from four top lenders, including Wells Fargo, J.P. Morgan Chase, Citigroup, and Washington Mutual. In economic news, U.S. jobless claims rose, and the Philadelphia Fed index on mid-Atlantic manufacturing fell to negative 24.9 in April from negative 17.4 the previous month, a more than 7-year low. Light sweet crude oil for May delivery fell 7 cents to $114.86 a barrel on the New York Mercantile Exchange, after hitting a record high of $115.54 a barrel in electronic trading. The U.S. national average price for a gallon (3.8 liters) of gasoline hit a record high of nearly $3.42. The U.S. dollar hit another record low versus the euro and rose against the yen. The Dow Jones industrial average was little changed, rising 1.22 to 12,620.49. IBM reported higher quarterly profits that beat estimates due to strong U.S. sales. Its shares rose 2 percent. United Technologies reported higher quarterly sales and profits that surpassed estimates, but its shares fell. Pfizer reported lower profits that were better than estimates, but shares of the pharmaceutical firm fell. The broader Standard & Poor's 500 index was virtually unchanged, rising 0.85 to 1,365.56. The technology-heavy Nasdaq composite index fell 8.28, or 0.35 percent, to 2,341.83. Online auctioneer eBay reported higher quarterly sales and profits that topped forecasts, but the company also reported weaker user growth than had been expected. Its shares fell 5 percent. The New York Stock Exchange composite index fell 29.95 to 9,173.81. The American Stock Exchange composite index fell 3.58 to 2,342.25. And the Russell 2000 index fell 5.39 to 708.00.