polynomial odd and even powers separation

This commit is contained in:
2021-10-05 17:33:30 +02:00
parent 59f3bb9eea
commit 4c420b1e9b
2 changed files with 5 additions and 1 deletions

4
t.cc
View File

@@ -2288,7 +2288,9 @@ if(1)
{
int n;
cin >>n ;
cout <<"Hermite = "<<hermite_polynomial<int>(n);
Polynomial<int> p=hermite_polynomial<int>(n);
cout <<"Hermite = "<<p<<std::endl;
cout <<"non-zero = "<< ((n&1)?p.odd_powers():p.even_powers())<<std::endl;
}