Density of states of continuous and discrete spin models: a case study