Formation energies of the intermetallic compounds at the ground and thermally excited states determined by the ab initio energetic calculation and calorimetric measurement