"Computing the principal branch of the log-gamma function" - читать интересную книгу автора (Hare.)