* Series expansion test (Laurent and Taylor series). */
/*
- * GiNaC Copyright (C) 1999-2019 Johannes Gutenberg University Mainz, Germany
+ * GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
return result;
}
+// Test expansion of powers of polynomials.
+static unsigned exam_series15()
+{
+ unsigned result = 0;
+
+ ex e = pow(x + pow(x,2), 2);
+
+ result += check_series(e, 0, Order(1), 0);
+ result += check_series(e, 0, Order(x), 1);
+ result += check_series(e, 0, Order(pow(x,2)), 2);
+ result += check_series(e, 0, pow(x,2) + Order(pow(x,3)), 3);
+ result += check_series(e, 0, pow(x,2) + 2*pow(x,3) + Order(pow(x,4)), 4);
+ result += check_series(e, 0, pow(x,2) + 2*pow(x,3) + pow(x,4), 5);
+ result += check_series(e, 0, pow(x,2) + 2*pow(x,3) + pow(x,4), 6);
+
+ return result;
+}
+
unsigned exam_pseries()
{
unsigned result = 0;
result += exam_series12(); cout << '.' << flush;
result += exam_series13(); cout << '.' << flush;
result += exam_series14(); cout << '.' << flush;
+ result += exam_series15(); cout << '.' << flush;
return result;
}