Fixed a bug in incomplete gamma, and refactored and refined internal selection logic. Added tests for incomplete gamma for int and half int arguments.