Raises error if zero or negative value passed to lgamma
Minor C style adjustments