Dear Alexei, It is a pity that this discussion is going round by round over the same path and we all reiterate the previous arguments.
"ASh" == Sheplyakov Alexei <varg@theor.jinr.ru> writes:
ASh> What if someone else wants to insert another "pair of wires" to ASh> implement another weird feature? Once more: the purpose of this wires *to avoid* implementation of weird features in the GiNaC kernel. For any such a request to add anything to the core GiNaC with special property with respect to power::eval() will follow a polite answer: "You can do it yourself in your own derived class." ASh> It depends. E.g., for someone who hardly ever uses complex ASh> numbers this is not a big deal. On the other hand, Anyone who hardly use any differential geometry will vote for exclusion of all "indexed" part from GiNaC, so.... ASh> This sounds like modular arithmetics (in Z_3, to be more ASh> specific). It would be nice if GiNaC had support of such a ASh> thing. CLN has modular integers, so _probably_ it is possible ASh> to do such calculations in more natural way (so that ASh> simplification of this kind are handled by CLN, just as I^2 -> ASh> -1). There are also symbols taking only values -1, 0, 1, with the property s^3=s, there are imaginary units for double and dual number (e^2=1, \epsilon^2=0), etc. Adding all of them separately "in a more natural way" either to GiNaC or CLN will really do it very cumbersome. ASh> IMHO, GiNaC's purpose is somewhat inverse: not to give as much ASh> freedom as possible, but to restrict the freedom to do some ASh> specific things effectively. BTW, other tools used by ASh> [particle] physicists (e.g. FORM) are even more restrictive, ASh> and there are very few complaints (if any) about that. Probably my real problem is that I am not a "[particle] physicist" ;-) I was also mislead by the phrase from the GiNaC tutorial: "we...tried to fill the gap by writing GiNaC. But of course its applications are in no way restricted to theoretical physics." ASh> The main point is not validity of those rules. Your ASh> implementation complicates things even for those who are not ASh> going to use any of such rules. Untrue. Anyone who do not need them may safely assume that they do not exist at all. Virtual methods basic::eval_power_base() and basic::eval_power_exponent() are not ever called from the core GiNaC. And they will not be ever called by any user code unless the user will take specific steps to call them. ASh> Please stop adding more methods to core classes Alright, assuming no second opinion exists. Best wishes, Vladimir -- Vladimir V. Kisil email: kisilv@maths.leeds.ac.uk -- www: http://maths.leeds.ac.uk/~kisilv/