#define NRANSI
#include "nrutil.h"
#include <iostream.h>

extern int ncom;
extern double *pcom,*xicom,(*nrfunc)(double []);

double df1dim(double x)
{
	int j;
	double f,*xt;

	xt=dvector(1,ncom);
	for (j=1;j<=ncom;j++) xt[j]=pcom[j]+x*xicom[j];
	f=(*nrfunc)(xt);
//	printf("in df1dim: f value: %20.12f\n",f);
//	for(j=1;j<=ncom;j++) printf("%6.0f",xt[j]*100000); printf("\n");
	free_dvector(xt,1,ncom);
	return f;
}
#undef NRANSI
/* (C) Copr. 1986-92 Numerical Recipes Software 21].,t45316. */
