* Series expansion test (Laurent and Taylor series). */
/*
- * GiNaC Copyright (C) 1999-2001 Johannes Gutenberg University Mainz, Germany
+ * GiNaC Copyright (C) 1999-2003 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
static unsigned check_series(const ex &e, const ex &point, const ex &d, int order = 8)
{
ex es = e.series(x==point, order);
- ex ep = ex_to_pseries(es).convert_to_poly();
+ ex ep = ex_to<pseries>(es).convert_to_poly();
if (!(ep - d).is_zero()) {
clog << "series expansion of " << e << " at " << point
<< " erroneously returned " << ep << " (instead of " << d
d = 1 + t + pow(t, 2) / 2 + pow(t, 3) / 6 + pow(t, 4) / 24 + pow(t, 5) / 120 + pow(t, 6) / 720 + pow(t, 7) / 5040 + Order(pow(x, 8));
result += check_series(e, 0, d.expand());
+ e = log(x);
+ d = e;
+ result += check_series(e, 0, d, 1);
+ result += check_series(e, 0, d, 2);
+
return result;
}