}
// Series expansion
-static unsigned exam_series1(void)
+static unsigned exam_series1()
{
using GiNaC::log;
e = pow(x, 8) * pow(pow(x,3)+ pow(x + pow(x,3), 2), -2);
d = pow(x, 4) - 2*pow(x, 5) + Order(pow(x, 6));
result += check_series(e, 0, d, 6);
+
+ e = cos(x) * pow(sin(x)*(pow(x, 5) + 4 * pow(x, 2)), -3);
+ d = pow(x, -9) / 64 - 3 * pow(x, -6) / 256 - pow(x, -5) / 960 + 535 * pow(x, -3) / 96768
+ + pow(x, -2) / 1280 - pow(x, -1) / 14400 - numeric(283, 129024) - 2143 * x / 5322240
+ + Order(pow(x, 2));
+ result += check_series(e, 0, d, 2);
return result;
}
// Series addition
-static unsigned exam_series2(void)
+static unsigned exam_series2()
{
unsigned result = 0;
ex e, d;
}
// Series multiplication
-static unsigned exam_series3(void)
+static unsigned exam_series3()
{
unsigned result = 0;
ex e, d;
}
// Series exponentiation
-static unsigned exam_series4(void)
+static unsigned exam_series4()
{
unsigned result = 0;
ex e, d;
}
// Order term handling
-static unsigned exam_series5(void)
+static unsigned exam_series5()
{
unsigned result = 0;
ex e, d;
}
// 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) +
}
// 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
}
// 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 - pow(x,8)/37800 + Order(pow(x,9));
}
// 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
}
// Series expansion of Li2((x==2)^2), caring about branch-cut
-static unsigned exam_series10(void)
+static unsigned exam_series10()
{
using GiNaC::log;
}
// Series expansion of logarithms around branch points
-static unsigned exam_series11(void)
+static unsigned exam_series11()
{
using GiNaC::log;
}
// Series expansion of other functions around branch points
-static unsigned exam_series12(void)
+static unsigned exam_series12()
{
using GiNaC::log;
}
-unsigned exam_pseries(void)
+unsigned exam_pseries()
{
unsigned result = 0;
vertex(ijpair ij = ijpair(0,0)) : indices(ij) { }
void increment_indices(const ijpair &ind) { indices.first += ind.first; indices.second += ind.second; }
virtual ~vertex() { }
- virtual vertex* copy(void) const = 0;
- virtual ijpair get_increment(void) const { return indices; }
+ virtual vertex* copy() const = 0;
+ virtual ijpair get_increment() const { return indices; }
virtual const ex evaluate(const symbol &x, const unsigned grad) const = 0;
bool operator==(const vertex &v) const { return (indices==v.indices); }
bool operator<(const vertex &v) const { return (indices<v.indices); }
class Sigma : public vertex {
public:
Sigma(ijpair ij = ijpair(0,0)) : vertex(ij) { }
- vertex* copy(void) const { return new Sigma(*this); }
- ijpair get_increment(void) const { return ijpair(indices.first+indices.second+1, 0); }
+ vertex* copy() const { return new Sigma(*this); }
+ ijpair get_increment() const { return ijpair(indices.first+indices.second+1, 0); }
const ex evaluate(const symbol &x, const unsigned grad) const;
private:
};
class Sigma_flipped : public Sigma {
public:
Sigma_flipped(ijpair ij = ijpair(0,0)) : Sigma(ij) { }
- vertex* copy(void) const { return new Sigma_flipped(*this); }
- ijpair get_increment(void) const { return ijpair(0, indices.first+indices.second+1); }
+ vertex* copy() const { return new Sigma_flipped(*this); }
+ ijpair get_increment() const { return ijpair(0, indices.first+indices.second+1); }
const ex evaluate(const symbol &x, const unsigned grad) const { return Sigma::evaluate(x, grad); }
private:
};
class Gamma : public vertex {
public:
Gamma(ijpair ij = ijpair(0,0)) : vertex(ij) { }
- vertex* copy(void) const { return new Gamma(*this); }
- ijpair get_increment(void) const { return ijpair(indices.first+indices.second+1, 0); }
+ vertex* copy() const { return new Gamma(*this); }
+ ijpair get_increment() const { return ijpair(indices.first+indices.second+1, 0); }
const ex evaluate(const symbol &x, const unsigned grad) const;
private:
};
class Vacuum : public vertex {
public:
Vacuum(ijpair ij = ijpair(0,0)) : vertex(ij) { }
- vertex* copy(void) const { return new Vacuum(*this); }
+ vertex* copy() const { return new Vacuum(*this); }
ijpair get_increment() const { return ijpair(0, indices.first+indices.second+1); }
const ex evaluate(const symbol &x, const unsigned grad) const;
private:
~node() { delete vert; }
void add_child(const node &, bool = false);
const ex evaluate(const symbol &x, unsigned grad) const;
- unsigned total_edges(void) const;
+ unsigned total_edges() const;
bool operator==(const node &) const;
bool operator<(const node &) const;
private:
return (product * vert->evaluate(x,grad));
}
-unsigned node::total_edges(void) const
+unsigned node::total_edges() const
{
unsigned accu = 0;
for (multiset<child>::const_iterator i=children.begin(); i!=children.end(); ++i) {
return 0;
}
-unsigned time_antipode(void)
+unsigned time_antipode()
{
unsigned result = 0;
timer jaeger_le_coultre;