With the market near all-time highs, it can be tough to find "cheap" tech stocks worth starting new positions in. However, three well-known tech stocks -- IBM (IBM -0.89%), Baidu (BIDU 1.24%), and Apple (AAPL -0.57%) -- all still trade at steep discounts to the S&P 500's P/E of 23 and their industry averages. Let's take a look at why investors don't seem interested in these three tech giants, and why they could be great long-term plays at current prices.

Image source: Pixabay.

IBM

IBM currently trades at 13 times trailing earnings, which is much lower than the average P/E of 21 for the IT services industry. IBM's 13% gain has outperformed the S&P 500's 4% gain this year, but that rally was likely fueled by its 3.7% forward yield in a low interest rate environment instead of any notable strengths in its business. IBM has hiked its dividend, which is comfortably supported by its payout ratio of 44%, for 16 consecutive years.

Big Blue's main problem is its lack of revenue growth. Its quarterly revenue has fallen year-over-year for 18 consecutive quarters due to rising competition and sluggish enterprise demand for its aging IT services, software, and hardware. IBM's core strategy is to offset those declines with its higher-growth "strategic imperatives" (cloud, analytics, mobility, social, and security) businesses. Revenue from those businesses rose 16% annually to $8 billion last quarter, and accounted for 40% of IBM's trailing-12-month revenue. Unfortunately, that growth didn't fully offset the weakness of its other businesses, which caused its total revenue to dip 0.4% annually.

Looking ahead, IBM's painful shift away from older products toward higher-growth ones should eventually pay off. Analysts still expect IBM's revenues to fall through 2017, but its earnings -- boosted by buybacks and a shift toward higher-margin services -- should improve 3.5% next year. It's a long road back for IBM, but its low multiple and high dividend should set a floor under the stock.

Baidu

Baidu, China's largest search engine, trades at just 13 times trailing earnings, which is much lower than the industry average P/E of 50 for internet information providers. Shares of Baidu have slumped 9% this year due to concerns about its spending and new regulations for its ads.

To remain competitive in the rapidly evolving Chinese internet market, Baidu has been adding O2O (online-to-offline) features -- like mobile payments, ride hailing, ticket bookings, and restaurant reservations -- to its core app. These investments are expected to cause its earnings to decline 12% this year.

Baidu's top line has been weighed down by more strict regulations regarding ads for healthcare services and pharmaceutical products. The sale of its stake in online travel agency Qunar to Ctrip further distorted year-over-year comparisons. As a result,  Baidu's revenue is expected to rise just 6% this year, compared to 35% growth in 2015. But looking further ahead to 2017, Baidu is expected to post 21% sales growth and 33% earnings growth as its O2O investments start paying off.

Apple

Despite being the most valuable company in the world by market cap, Apple trades at just 13 times trailing earnings -- a discount to the industry average of 17 for electronic equipment makers. The stock has barely outperformed the S&P 500, with a 5% gain this year, mainly due to ongoing concerns about sales of the iPhone, which generated 60% of the company sales last quarter.

Image source: Apple.

Shipments of iPhones, iPads, and Macs all fell annually last quarter, causing Apple to post its first year-over-year revenue decline since 2001. Apple's response has been to diversify its hardware business with the Apple Watch, and its services business with Apple Music, Apple Pay, and other software platforms. But these businesses still only generate a small portion of the tech giant's overall revenues.

But looking ahead, Apple still has plenty of cash to spend on acquisitions, buybacks, and dividends to keep investors interested. New acquisitions could reduce the weight of its hardware business and give Apple new pillars of growth. Buybacks could boost its earnings growth, and its forward yield of 2% (supported by a low payout ratio of 26%) could easily be doubled to attract income investors. It's tough to see what comes next for Apple, but I certainly wouldn't bet against the tech giant's long-term prospects.

Patience pays off...

Investors should remember that stocks generally have low P/Es because investors aren't eager to buy them. However, investing in companies with sound long-term growth prospects while their stocks are at low multiples could pay off over the long run. There's no guarantee that investors will suddenly fall in love with IBM, Baidu, or Apple again, but I believe the potential rewards outweigh the risks at their current prices.