[GiNaC-devel] Fixed bug in power::expand_mul, but .....

Richard B. Kreckel kreckel at ginac.de
Wed Jan 31 22:54:28 CET 2007


Dear Chris,

Chris Dams wrote:

>I fixed a bug in power::expand_mul by calling the method
>mul::combine_pair_with_coeff_to_pair from this function. However, the
>comments are strongly discouraging. They say, as you can read in the
>source: "it is safe not to call mul::combine_pair_with_coeff_to_pair()
>since n is an integer". So, basically I am rather rudely ignoring the
>comments, but I really don't understand what is unsafe about this method,
>so maybe someone can enlighten me.
>  
>

I am suspecting that you are misreading that comment. The way I read it 
is that calling combine_pair_with_coeff_to_pair() here is not deemed 
necessary and may be elided for the sake of optimization.

Does that make sense?

Cheers
-richy.

-- 
Richard B. Kreckel
<http://www.ginac.de/~kreckel/>



More information about the GiNaC-devel mailing list