compute_hprime