Hamiltonian Functions Modulo Constants