[sage-devel] Re: number_field_element coercion

2007-11-09 Thread Robert Bradshaw
On Nov 8, 2007, at 1:52 PM, mabshoff wrote: > There is without a doubt something fishy going on with coercion. See > also malb's report with polynomial rings at > > http://www.sagetrac.org/sage_trac/ticket/1046 Just to confirm, this is only the first time, right? I am pretty sure this is becaus

[sage-devel] Re: number_field_element coercion

2007-11-09 Thread William Stein
On Fri, 09 Nov 2007 15:07:03 -, John Voight <[EMAIL PROTECTED]> wrote: > Thanks, somehow I knew this was going to become a trac ticket. It is > also my suspicion that it is an optimization issue with number > fields. It seems really bizarre that it should be calling a > polynomial ring const

[sage-devel] Re: number_field_element coercion

2007-11-09 Thread John Voight
Thanks, somehow I knew this was going to become a trac ticket. It is also my suspicion that it is an optimization issue with number fields. It seems really bizarre that it should be calling a polynomial ring constructor! (The cost right now is absolutely killing me right now. I've started enum

[sage-devel] Re: number_field_element coercion

2007-11-09 Thread William Stein
On Nov 8, 2007 9:52 PM, mabshoff <[EMAIL PROTECTED]> wrote: [...] > > Woah! Can someone explain to me the various calls above? I'd think > > this should take epsilon time to coerce the elements of the sequence. > > Or perhaps is there another better way to coerce into Z_F (or, > > equivalently f

[sage-devel] Re: number_field_element coercion

2007-11-08 Thread mabshoff
On Nov 8, 10:46 pm, John Voight <[EMAIL PROTECTED]> wrote: > Hello all, Hi John, > > Check this out: > > sage: def stupid_function(n): > : Z_F = NumberField(x^2-x-1, 't').maximal_order() > : for i in range(n): > : Z_F([5,1]) > : > sage: prun stupid_function(10^4