Fixed gamma, log-gamma, and log1p definitions in math