On Wednesday 26 February 2003 4:15 pm, Maarten de Boer wrote:
Nathaniel wrote:
It's almost as if some macro is causing
"Complex" to be evaluated as "0".
Could you confirm that with g++ -E PoleZeroEditor.cxx ?
Maarten
Yep - looks like that's the problem. I've still got no idea where the macro
is coming from though.
void FindCoefs(ComplexArray& complexCoefs,ComplexArray& roots)
{
int i,j,n=roots.size;
0 one(1,0);
complexCoefs[n] = -roots[0];
complexCoefs[n-1] = one;
complexCoefs.size = n+1;
for (j=1;j<n;j++)
{
complexCoefs[n-j-1] = one;
for (i=n-j;i<n;i++)
{
complexCoefs[i] = complexCoefs[i+1] -
(roots[j]*complexCoefs[i]);
}
complexCoefs[n] = -(roots[j]*complexCoefs[n]);
}
}