Formation energy of disordered alloys from the energetics of ordered compounds.