pub fn charge_density(m: R, beta: R, mu: R) -> R