271 #define SCREEN_FILE_WRITE \ 272 printf("%s", outline); \ 273 fprintf(fp, "%s", outline); 290 if ((fp=fopen(outfile,
"w")) == NULL) {
291 strcpy(errmsg,
"Can't write to the '");
292 strcat(errmsg, outfile);
293 strcat(errmsg,
"' file.\n");
304 if ((fp=fopen(outfile,
"w")) == NULL) {
305 strcpy(errmsg,
"Can't write to the '");
306 strcat(errmsg, outfile);
307 strcat(errmsg,
"' file.\n");
316 printf(
"Margins calculated to within +/-%5.2f percent.\n",
param.
accuracy);
317 fprintf(fp,
"Margins calculated to within +/-%5.2f percent.\n",
param.
accuracy);
318 printf(
"Param: Margins: Percent:\n");
319 fprintf(fp,
"Param: Margins: Percent:\n");
321 for (x=1;
dim >= x; ++x) {
322 for (y=1;
dim >= y; ++y)
329 nrerror(
"parameter values failed");
332 sprintf(outline,
"%s\t%9.5f ...%9.5f ...",
338 margins[margcount].
val=
340 margins[margcount].
sgn=-1;
342 margins[margcount++].
pseudo=
353 nrerror(
"parameter values failed");
360 margins[margcount].
val=
362 margins[margcount].
sgn=+1;
364 margins[margcount++].
pseudo=
367 sprintf(outline,
"-%5.1f%s +%5.1f%s\t",
368 margins[margcount-2].val,
369 margins[margcount-2].pseudo?
"*":
" ",
370 margins[margcount-1].val,
371 margins[margcount-1].pseudo?
"*":
" " 375 sprintf(outline,
"\n");
384 printf(
"\n\nMost critical margins:\n\n");
385 fprintf(fp,
"\n\nMost critical margins:\n\n");
386 for(x=0; x<margcount; x++)
388 sprintf(outline,
"%d. %s\t=>\t%s%5.1f%s\n",
389 x+1,
names[margins[x].param_nr],
390 ((margins[x].sgn>0)?
"+":
"-"), margins[x].val,
391 (margins[x].pseudo?
"*":
" "));
char logic_ext[NAME_LENGTH]
char circuit_name[NAME_LENGTH]
char output_dir[NAME_LENGTH]
void nrerror(char *error_text)
#define SCREEN_FILE_WRITE
char opt_num[NAME_LENGTH]
double * vector(int nl, int nh)
char marg_ext[NAME_LENGTH]
static int store_boundary_logic(int param_nr, int highmarg, int pseudomarg)
char(* names)[NAME_LENGTH]
char bound_ext[NAME_LENGTH]
int addpoint(double *pc, double *po)
static char outline[LONG_LINE_LENGTH]
static int margcomp(MARGIN *pm1, MARGIN *pm2)
double ** matrix(int nrl, int nrh, int ncl, int nch)