This is the mail archive of the gsl-discuss@sources.redhat.com mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

hypergeometric function


Hello,

I'm a new user of the gsl-library. Everything works well. But when I tried
to look at the hypergeometric function, I recognized a discontinuity (jump)
in the graphic-drawing of the function. I think this should not be so. I
used the following code segment:

void Test(void)
{
	double AktVal, x;
	int n, p, LoopX, MidX, MidY, CalcSize, gsl_error;
	CSize sizeTotal;
	gsl_sf_result result;

	sizeTotal = GetTotalSize();
	MidX = sizeTotal.cx/2.0;
	MidY = sizeTotal.cy/2.0;

	n = 3;
	p= 8;

	CalcSize = 1000;

	x = 0;
	gsl_error = gsl_sf_hyperg_1F1_int_e(-n, p+1, x, &result) ;
	if(gsl_error)	AfxMessageBox(gsl_strerror (gsl_error));
	AktVal = result.val;
	pDC->MoveTo(0, MidY - AktVal);
	for(LoopX = 0; LoopX < CalcSize; LoopX++ )
	{
		x += 0.1;
		gsl_error = gsl_sf_hyperg_1F1_int_e(-n, p+1, x, &result);
		if(gsl_error)	AfxMessageBox(gsl_strerror (gsl_error));
		AktVal = 100.0*result.val;
		pDC->LineTo( LoopX, MidY - AktVal);
	}
}

(Visual C++ 6.0, NT 4.0)

Can anybody tell me if there's something wrong with my code or with the
function? No error message occured.

Thanks for your help.

Best regards
Stefan Koch

mailto:s.koch@seh-zuelpich.de


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]