Dear all, 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. Many thanks, Chris
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/>
Hi! On Wed, 31 Jan 2007, Richard B. Kreckel wrote:
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?
Oh yes, it seems I'm reading so fast that I do not even note anymore the order the words have ;-(. The comment got eliminated anyway, because it is wrong, as noted on ginac-list. Best wishes, Chris
participants (2)
-
Chris Dams
-
Richard B. Kreckel