Stocks fluctuated as a slide in some of the world’s largest technology companies offset gains in several other industries.