v2
The V1 release was returning low quality output, this one matches the desired result as measured against Microsoft Excels functions CHISQ.INV and CHISQ.INV.RT
Updated:
chi2Inv(pin, deg, tail)
Returns the inverse of the right-tailed or left-tailed probability of the chi-squared distribution.
Parameters:
pin: float, probability
deg: float, degress of freedom.
tail: string, tail, either "r" for right or "l" for left
Returns: float.