The R Project SVN R

Rev

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

Rev 49066 Rev 49744
Line 107... Line 107...
107
}
107
}
108
#endif
108
#endif
109
 
109
 
110
#ifndef HAVE_C99_COMPLEX
110
#ifndef HAVE_C99_COMPLEX
111
 
111
 
112
/* "export" this (to be API) : */
-
 
113
void R_cpow_n(Rcomplex *r, Rcomplex *x, int k) {
112
static void R_cpow_n(Rcomplex *r, Rcomplex *x, int k) {
114
    if(k == 0) {
113
    if(k == 0) {
115
	r->r = 1.;
114
	r->r = 1.;
116
	r->i = 0.;
115
	r->i = 0.;
117
    } else if(k < 0) {
116
    } else if(k < 0) {
118
	Rcomplex h;
117
	Rcomplex h;
Line 183... Line 182...
183
}
182
}
184
 
183
 
185
#else /* HAVE_C99_COMPLEX */
184
#else /* HAVE_C99_COMPLEX */
186
 
185
 
187
 
186
 
188
/* "export" this (to be API) : */
-
 
189
double complex R_cpow_n(double complex X, int k) {
187
static double complex R_cpow_n(double complex X, int k) {
190
    if(k == 0)
188
    if(k == 0)
191
	return (double complex) 1.;
189
	return (double complex) 1.;
192
    else if(k < 0)
190
    else if(k < 0)
193
	return 1. / R_cpow_n(X, -k);
191
	return 1. / R_cpow_n(X, -k);
194
    else {/* k > 0 */
192
    else {/* k > 0 */