made a slight correction. now returns log(abs(gamma)) instead of log(gamma)