How does a corporations’ computation of earnings and profits

How does a corporations’ computation of earnings and profits differ based on the tax treatment of a stock redemption as a dividend as opposed to an exchange?