index 6f3ab5b5fbf21c0d20f8d4d04643704ec6c141b0..8bd785a623ace37925cee58d1e8cda521d7ce9ae 100644 (file)
@@ -3,7 +3,7 @@
*  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
@@ -32,15 +32,17 @@ static unsigned check_series(const ex &e, const ex &point, const ex &d, int orde
clog << "series expansion of " << e << " at " << point
<< " erroneously returned " << ep << " (instead of " << d
<< ")" << endl;
-               (ep-d).printtree(clog);
+               clog << tree << (ep-d) << dflt;
return 1;
}
return 0;
}

// Series expansion
-static unsigned exam_series1(void)
+static unsigned exam_series1()
{
+       using GiNaC::log;
+
unsigned result = 0;
ex e, d;

@@ -107,7 +109,7 @@ static unsigned exam_series1(void)
}

-static unsigned exam_series2(void)
+static unsigned exam_series2()
{
unsigned result = 0;
ex e, d;
@@ -120,7 +122,7 @@ static unsigned exam_series2(void)
}

// Series multiplication
-static unsigned exam_series3(void)
+static unsigned exam_series3()
{
unsigned result = 0;
ex e, d;
@@ -133,7 +135,7 @@ static unsigned exam_series3(void)
}

// Series exponentiation
-static unsigned exam_series4(void)
+static unsigned exam_series4()
{
unsigned result = 0;
ex e, d;
@@ -150,7 +152,7 @@ static unsigned exam_series4(void)
}

// Order term handling
-static unsigned exam_series5(void)
+static unsigned exam_series5()
{
unsigned result = 0;
ex e, d;
@@ -170,7 +172,7 @@ static unsigned exam_series5(void)
}

// Series expansion of tgamma(-1)
-static unsigned exam_series6(void)
+static unsigned exam_series6()
{
ex e = tgamma(2*x);
ex d = pow(x+1,-1)*numeric(1,4) +
@@ -202,7 +204,7 @@ static unsigned exam_series6(void)
}

// Series expansion of tan(x==Pi/2)
-static unsigned exam_series7(void)
+static unsigned exam_series7()
{
ex e = tan(x*Pi/2);
ex d = pow(x-1,-1)/Pi*(-2) + pow(x-1,1)*Pi/6 + pow(x-1,3)*pow(Pi,3)/360
@@ -212,7 +214,7 @@ static unsigned exam_series7(void)
}

// Series expansion of log(sin(x==0))
-static unsigned exam_series8(void)
+static unsigned exam_series8()
{
ex e = log(sin(x));
ex d = log(x) - pow(x,2)/6 - pow(x,4)/180 - pow(x,6)/2835
@@ -221,7 +223,7 @@ static unsigned exam_series8(void)
}

// Series expansion of Li2(sin(x==0))
-static unsigned exam_series9(void)
+static unsigned exam_series9()
{
ex e = Li2(sin(x));
ex d = x + pow(x,2)/4 - pow(x,3)/18 - pow(x,4)/48
@@ -231,8 +233,10 @@ static unsigned exam_series9(void)
}

// Series expansion of Li2((x==2)^2), caring about branch-cut
-static unsigned exam_series10(void)
+static unsigned exam_series10()
{
+       using GiNaC::log;
+
ex e = Li2(pow(x,2));
ex d = Li2(4) + (-log(3) + I*Pi*csgn(I-I*pow(x,2))) * (x-2)
+ (numeric(-2,3) + log(3)/4 - I*Pi/4*csgn(I-I*pow(x,2))) * pow(x-2,2)
@@ -243,8 +247,10 @@ static unsigned exam_series10(void)
}

// Series expansion of logarithms around branch points
-static unsigned exam_series11(void)
+static unsigned exam_series11()
{
+       using GiNaC::log;
+
unsigned result = 0;
ex e, d;
symbol a("a");
@@ -283,8 +289,10 @@ static unsigned exam_series11(void)
}

// Series expansion of other functions around branch points
-static unsigned exam_series12(void)
+static unsigned exam_series12()
{
+       using GiNaC::log;
+
unsigned result = 0;
ex e, d;

@@ -309,7 +317,7 @@ static unsigned exam_series12(void)
}

-unsigned exam_pseries(void)
+unsigned exam_pseries()
{
unsigned result = 0;