[sage-devel] Re: segfault issue

2008-12-05 Thread Nick Alexander
On 5-Dec-08, at 10:57 AM, daveloeffler wrote: > > I think you've uncovered a bug that had been masked by the is_one bug. > If I'm not mistaken, I^-1 calls MultiplicativeGroupElement.__invert__, > which tests whether self is one and if not returns 1/self. Obligingly, > the coercion model (being a

[sage-devel] Re: segfault issue

2008-12-05 Thread John Cremona
That sounds right (and I'm sure it is). What is worrying me slightly is that I have a vague memory that I once edited that generic __invert__() code (possibly it was me who added the is_one() test. I would prbably be best to have __invert__() NotImplmented in the base class, forcing all derived

[sage-devel] Re: segfault issue

2008-12-05 Thread daveloeffler
I think you've uncovered a bug that had been masked by the is_one bug. If I'm not mistaken, I^-1 calls MultiplicativeGroupElement.__invert__, which tests whether self is one and if not returns 1/self. Obligingly, the coercion model (being asked to calculate 1/self) calls __invert__ again! (I conv