The R Project SVN R

Rev

Rev 59039 | Rev 64656 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 59039 Rev 59097
Line 134... Line 134...
134
 
134
 
135
	/* Compute gamma(x) for -10 <= x <= 10
135
	/* Compute gamma(x) for -10 <= x <= 10
136
	 * Reduce the interval and find gamma(1 + y) for 0 <= y < 1
136
	 * Reduce the interval and find gamma(1 + y) for 0 <= y < 1
137
	 * first of all. */
137
	 * first of all. */
138
 
138
 
139
	n = x;
139
	n = (int) x;
140
	if(x < 0) --n;
140
	if(x < 0) --n;
141
	y = x - n;/* n = floor(x)  ==>	y in [ 0, 1 ) */
141
	y = x - n;/* n = floor(x)  ==>	y in [ 0, 1 ) */
142
	--n;
142
	--n;
143
	value = chebyshev_eval(y * 2 - 1, gamcs, ngam) + .9375;
143
	value = chebyshev_eval(y * 2 - 1, gamcs, ngam) + .9375;
144
	if (n == 0)
144
	if (n == 0)