pub fn chemical_potential(m: R, beta: R, n: R) -> R