bug-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-gsl] (no subject)


From: 晏雄锋
Subject: [Bug-gsl] (no subject)
Date: Sun, 21 Jul 2013 15:07:47 +0800

I am using gsl_poly_complex_solve() to determine the roots of some basic
polynomials.
But it failure to run.
When I change any number of PolyParam, it works. Why? I don't know.
Here is the code.
Thank you very much!

#include <iostream>
#include <gsl/gsl_poly.h>
void main()
{
double PolyParm[6];
PolyParm[0] = 0;
PolyParm[1] = 1792548;//1792549
PolyParm[2] = 324810;
PolyParm[3] = -288348;
PolyParm[4] = -43875;
PolyParm[5] = 20715;
double z[10];
gsl_poly_complex_workspace *w = gsl_poly_complex_workspace_alloc(6);
gsl_poly_complex_solve(PolyParm,6,w,z);
gsl_poly_complex_workspace_free(w);
for (int it=0;it<5;it++)
{
printf("z%d = %+.18f %+ .18f\n",it,z[2*it],z[2*it+1]);
}
return;
}


reply via email to

[Prev in Thread] Current Thread [Next in Thread]