40 const unsigned long uupSize = 100;
41 static unsigned long uup[uupSize];
43 static unsigned long Nold = 0;
44 static unsigned long Kold = 0;
48 if ( (n < k) || !n )
return 0;
56 if ( (Nold == n) && (k < Kold) )
57 return *(uup + k - 1);
61 printf(
"choose( unsigned, unsigned) : overflow\n");
74 for (j=0; j<
mmin(i,k); j++)
84 return *(uup + k - 1);
91 double r=((double)
mysrand)/4294967297.0;
104 mysrand=(
unsigned long) (clock());
109 printf(
"Error due to %s.", s);
110 getchar(); exit(255);
122 const double SMALL=5.422e-20, BIG=1.304e19/((double)i);
123 double s1=0,s2=0,s3=0, x1max=0, x3max=0, xabs;
133 s1=1.0+s1*
sqr(x1max/xabs);
144 s3=1.0+s3*
sqr(x3max/xabs);
148 if (xabs!=0) s3+=
sqr(xabs/x3max);
153 if (s1!=0)
return x1max*
sqrt(s1+(s2/x1max)/x1max);
156 if (s2>=x3max)
return sqrt(s2*(1.0+(x3max/s2)*(x3max*s3)));
157 return sqrt(x3max*((s2/x3max)+(x3max*s3)));
159 return x3max*
sqrt(s3);
173 while ((*t==
' ')||(*t==
'\t')) t++;
179 if (*line==
';')
return 1;
181 if ((*line==
EOL1)||(*line==
EOL2)||(*line==
'\0'))
return 1;
189 while ((*tline!=
EOL1)&&(*tline!=
EOL2)&&(*tline)) tline++;
196 if ((*t==
'\'')||(*t==
'"'))
208 if (ncolumn) nc=*ncolumn;
213 while ((*n)&&(*n!=
'\t')&&(*n!=
' ')&&(*n!=13)&&(*n!=10)) n++;
215 while ((*n)&&((*n==
'\t')||(*n==
' ')||(*n==13)||(*n==10))) n++;
218 if (ncolumn) *ncolumn=nc;
219 char **names=(
char**)malloc(nc*
sizeof(
char**));
220 n=(
char*)malloc(strlen(line)+1);
223 for (j=0; j<nc-1; j++)
226 while ((*n)&&(*n!=
'\t')&&(*n!=
' ')&&(*n!=13)&&(*n!=10)) n++;
227 if (*n) { *n=0; n++; }
228 while ((*n)&&((*n==
'\t')||(*n==
' ')||(*n==13)||(*n==10))) n++;
236 int l=(int)strlen(line);
238 if ((*line==
'\'')||(*line==
'"')) { l-=2; line++; }
239 char *t=(
char*)malloc(l+1);
251 if ((*t==
'\r')||(*t==
'\n')) *t=
' ';
259 while ((*t!=
'\r')&&(*t!=
'\n')&&(*t)) t++;
260 if (*t==
'\n') {
if (*(t+1)==
'\r') t++; }
261 else if (*t==
'\r') {
if (*(t+1)==
'\n') t++; }
271 char *buf=(
char*)malloc(l+1);
272 if (fread(buf,l,1,f) != l) {
273 std::cerr <<
"error while loading file (no more info available)" << std::endl; exit(255);
void sqrt(Image< double > &op)
ql0001_ & k(htemp+1),(cvec+1),(atemp+1),(bj+1),(bl+1),(bu+1),(x+1),(clamda+1), &iout, infoqp, &zero,(w+1), &lenw,(iw+1), &leniw, &glob_grd.epsmac