Index: indexed.cpp =================================================================== RCS file: /home/cvs/GiNaC/ginac/indexed.cpp,v retrieving revision 1.88 diff -r1.88 indexed.cpp 328,333c328,339 < if ((options & expand_options::expand_indexed) && is_exactly_a(seq[0])) { < < // expand_indexed expands (a+b).i -> a.i + b.i < const ex & base = seq[0]; < ex sum = _ex0; < for (size_t i=0; i if (options & expand_options::expand_indexed) { > ex newbase=seq[0].expand(options); > if(is_exactly_a(newbase)) { > ex sum = _ex0; > for (size_t i=0; i exvector s = seq; > s[0] = newbase.op(i); > sum += thiscontainer(s).expand(options); > } > return sum; > } > if(!are_ex_trivially_equal(newbase, seq[0])) { 335,336c341,342 < s[0] = base.op(i); < sum += thiscontainer(s).expand(); --- > s[0] = newbase; > return ex_to(thiscontainer(s)).inherited::expand(options); 338,341c344,345 < return sum; < < } else < return inherited::expand(options); --- > } > return inherited::expand(options);