Items of gross income, expenses, losses, and deductions, other than those specified in sections
861
(a) and
862
(a), shall be allocated or apportioned to sources within or without the United States, under regulations prescribed by the Secretary. Where items of gross income are separately allocated to sources within the United States, there shall be deducted (for the purpose of computing the taxable income therefrom) the expenses, losses, and other deductions properly apportioned or allocated thereto and a ratable part of other expenses, losses, or other deductions which cannot definitely be allocated to some item or class of gross income. The remainder, if any, shall be included in full as taxable income from sources within the United States.