[sage-devel] Re: Major bug in GF(109)['x', 'y']

2008-09-11 Thread Michael Brickenstein
ok, it isn't normalize, but a very small function called npWrite void npWrite (number &a) { if ((long)a > (npPrimeM >>1)) StringAppend("-%d",(int)(npPrimeM- ((long)a))); else StringAppend("%d",(int)((long)a)); } This is set to the current ring in numbers.cc n->nWrite

[sage-devel] Re: Major bug in GF(109)['x', 'y']

2008-09-10 Thread Martin Albrecht
> I can well understand why no-one wanted to write their own conversion > of a multi-variable poly to a string, but it would not be any harder > than for univars: just loop over the monomials... > John :-) My main concern is not the writing part but making it fast, since ideally one would conv

[sage-devel] Re: Major bug in GF(109)['x', 'y']

2008-09-10 Thread John Cremona
2008/9/10 Martin Albrecht <[EMAIL PROTECTED]>: >> > Of course, I *could* write our own _repr_ function instead of just using >> > whatever Singular returns back. >> >> Wouldn't it be better to write a conversion from singular to a Sage >> type? Or would that be impossibly complicated (I have no

[sage-devel] Re: Major bug in GF(109)['x', 'y']

2008-09-10 Thread Martin Albrecht
On Wednesday 10 September 2008, John Cremona wrote: > 2008/9/10 Martin Albrecht <[EMAIL PROTECTED]>: > > On Wednesday 10 September 2008, John Cremona wrote: > >> 2008/9/10 Nick Alexander <[EMAIL PROTECTED]>: > >> > On 10-Sep-08, at 1:49 AM, Martin Albrecht wrote: > >> >> On Wednesday 10 September

[sage-devel] Re: Major bug in GF(109)['x', 'y']

2008-09-10 Thread John Cremona
2008/9/10 Martin Albrecht <[EMAIL PROTECTED]>: > > On Wednesday 10 September 2008, John Cremona wrote: >> 2008/9/10 Nick Alexander <[EMAIL PROTECTED]>: >> > On 10-Sep-08, at 1:49 AM, Martin Albrecht wrote: >> >> On Wednesday 10 September 2008, mabshoff wrote: >> >>> This is double plus not good. >

[sage-devel] Re: Major bug in GF(109)['x', 'y']

2008-09-10 Thread Martin Albrecht
On Wednesday 10 September 2008, John Cremona wrote: > 2008/9/10 Nick Alexander <[EMAIL PROTECTED]>: > > On 10-Sep-08, at 1:49 AM, Martin Albrecht wrote: > >> On Wednesday 10 September 2008, mabshoff wrote: > >>> This is double plus not good. > >>> > >>> {{{ > >>> sage: GF(109)['x', 'y'](-10) > >>>

[sage-devel] Re: Major bug in GF(109)['x', 'y']

2008-09-10 Thread John Cremona
2008/9/10 Nick Alexander <[EMAIL PROTECTED]>: > > > On 10-Sep-08, at 1:49 AM, Martin Albrecht wrote: > >> >> On Wednesday 10 September 2008, mabshoff wrote: >>> This is double plus not good. >>> >>> {{{ >>> sage: GF(109)['x', 'y'](-10) >>> -10 >>> sage: GF(109)['x'](-10) >>> 99 >>> >>> }}} >> >> I

[sage-devel] Re: Major bug in GF(109)['x', 'y']

2008-09-10 Thread Nick Alexander
On 10-Sep-08, at 1:49 AM, Martin Albrecht wrote: > > On Wednesday 10 September 2008, mabshoff wrote: >> This is double plus not good. >> >> {{{ >> sage: GF(109)['x', 'y'](-10) >> -10 >> sage: GF(109)['x'](-10) >> 99 >> >> }}} > > I don't see the problem, since -10 == 99 mod GF(109).Even if it is

[sage-devel] Re: Major bug in GF(109)['x', 'y']

2008-09-10 Thread Michael Brickenstein
It's probably just a function pointer. void(*nNormalize)(number &a); But I am not sure about side effects. Michael On 10 Sep., 15:54, "John Cremona" <[EMAIL PROTECTED]> wrote: > 2008/9/10 Martin Albrecht <[EMAIL PROTECTED]>: > > > > > On Wednesday 10 September 2008, mabshoff wrote: > >> This

[sage-devel] Re: Major bug in GF(109)['x', 'y']

2008-09-10 Thread John Cremona
2008/9/10 Martin Albrecht <[EMAIL PROTECTED]>: > > On Wednesday 10 September 2008, mabshoff wrote: >> This is double plus not good. >> >> {{{ >> sage: GF(109)['x', 'y'](-10) >> -10 >> sage: GF(109)['x'](-10) >> 99 >> >> }}} > > I don't see the problem, since -10 == 99 mod GF(109).Even if it is und

[sage-devel] Re: Major bug in GF(109)['x', 'y']

2008-09-10 Thread Martin Albrecht
On Wednesday 10 September 2008, mabshoff wrote: > This is double plus not good. > > {{{ > sage: GF(109)['x', 'y'](-10) > -10 > sage: GF(109)['x'](-10) > 99 > > }}} I don't see the problem, since -10 == 99 mod GF(109).Even if it is undesired that they print differently how come it is 'major'? Wh

[sage-devel] Re: Major bug in GF(109)['x', 'y']

2008-09-10 Thread John Cremona
I seem to have hit this by accident: http://trac.sagemath.org/sage_trac/ticket/4096. John 2008/9/10 mabshoff <[EMAIL PROTECTED]>: > > > > On Sep 9, 7:27 pm, Jason Grout <[EMAIL PROTECTED]> wrote: >> David Harvey wrote: >> >> > On Sep 9, 2008, at 10:20 PM, mabshoff wrote: >> >> >>> Could a ticket

[sage-devel] Re: Major bug in GF(109)['x', 'y']

2008-09-09 Thread mabshoff
On Sep 9, 7:27 pm, Jason Grout <[EMAIL PROTECTED]> wrote: > David Harvey wrote: > > > On Sep 9, 2008, at 10:20 PM, mabshoff wrote: > > >>> Could a ticket be opened? > >> #4095 it is. > > > You all know what this means. > > ooh, ooh...it's still open!  /me thinks really hard for a bug :). I

[sage-devel] Re: Major bug in GF(109)['x', 'y']

2008-09-09 Thread Jason Grout
David Harvey wrote: > > On Sep 9, 2008, at 10:20 PM, mabshoff wrote: > >>> Could a ticket be opened? >> #4095 it is. > > You all know what this means. ooh, ooh...it's still open! /me thinks really hard for a bug :). Jason --~--~-~--~~~---~--~~ To post t

[sage-devel] Re: Major bug in GF(109)['x', 'y']

2008-09-09 Thread David Harvey
On Sep 9, 2008, at 10:20 PM, mabshoff wrote: >> Could a ticket be opened? > > #4095 it is. You all know what this means. david --~--~-~--~~~---~--~~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email

[sage-devel] Re: Major bug in GF(109)['x', 'y']

2008-09-09 Thread mabshoff
On Sep 9, 7:13 pm, Nick Alexander <[EMAIL PROTECTED]> wrote: > This is double plus not good. > > {{{ > sage: GF(109)['x', 'y'](-10) > -10 > sage: GF(109)['x'](-10) > 99 > > }}} > > Could a ticket be opened? #4095 it is. > Nick Cheers, Michael --~--~-~--~~~---~--~-