-
Notifications
You must be signed in to change notification settings - Fork 65
Open
Description
template <int N, typename ftype> inline void PolynomialInflate( ftype infPoly[N+2], ftype const coef[N+1], ftype root )
{
infPoly[N+1] = coef[N];
for ( int i=N-1; i>=0; --i ) infPoly[i+1] = coef[i] - root*infPoly[i+1];
infPoly[0] = -root*coef[0];
}
Should that be infPoly[i+1] = coef[i] - root * coef[i+1]?
Completely possible that I can't math or computer before caffeine this morning, but my C# version of that code isn't passing tests I wrote without that change and the fix makes sense in my head since it combines the lines before and after it, and the middle coefficients in the results are what I'm seeing being buggy.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels