Re: [sage-devel] coerce(ComplexNumber, 1+I) segfaults

2011-11-15 Thread David Roe
This is now #12038, which has a patch which eliminates the segfault. The problem was that you shouldn't be using coerce like that: the first argument should be a parent, not the element class. That element class requires two inputs: both the parent and the data to make a new element out of. In t

Re: [sage-devel] coerce(ComplexNumber, 1+I) segfaults

2011-11-14 Thread Justin C. Walker
On Nov 14, 2011, at 18:04 , Dan Drake wrote: > This is not fun: > > sage: from sage.rings.complex_number import ComplexNumber as CN > sage: parent(1+I) > Symbolic Ring > sage: coerce(CN, 1+I) > BOOM > > (with 4.8.alpha1 and 4.7.2 in 64-bit Linux) > > It looks like mpfr is extremely unhappy ab

[sage-devel] coerce(ComplexNumber, 1+I) segfaults

2011-11-14 Thread Dan Drake
This is not fun: sage: from sage.rings.complex_number import ComplexNumber as CN sage: parent(1+I) Symbolic Ring sage: coerce(CN, 1+I) BOOM (with 4.8.alpha1 and 4.7.2 in 64-bit Linux) It looks like mpfr is extremely unhappy about something. Also, if I just use the regular ComplexNumber in the