some helper functions for fast gamma function of rational arguments