Thank you, Mr Hosking,
yes, this is a buglet.
I had started to fix this (and similar cases)
-- using a C Macro based approach in src/nmath/dpq.h --
For this reason, the fix will probably only appear in R-devel
i.e., from R-2.2.0 on, and not yet in [R 2.1.1]-patched.
Regards,
Martin Maechler,
> qgamma(1,1.1)
[1] Inf
as expected. But for shape parameter between 0.16 and 1:
> qgamma(1,.5)
[1] NaN
Warning message:
NaNs produced in: qgamma(p, shape, scale, lower.tail, log.p)
and for shape parameter 0.16 or less:
> qgamma(1,.1)
[1] 99.42507
Arguments close to 1