Re: [sage-devel] QuaternionAlgebra comparison problem

2014-10-05 Thread Nathan Dunfield
I looked at Vincent's patch and tested it on my own machine. It definitely fixes the issue and the new doctest passes. However, buildbot reports doctest failures in other modules (including ones almost certainly unconnected with the quaternion algebra code, like " src/sage/rings/real_double.p

Re: [sage-devel] QuaternionAlgebra comparison problem

2014-10-05 Thread Vincent Delecroix
>> >> Hello Nathann, >> > > I am Nathann. He is Nathan. > > It is just totally different. Oh! Right! My mistake. My apologies to both of you. Vincent -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receivi

Re: [sage-devel] QuaternionAlgebra comparison problem

2014-10-04 Thread Nathann Cohen
> > Hello Nathann, > I am Nathann. He is Nathan. It is just totally different. Nathann -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@

Re: [sage-devel] QuaternionAlgebra comparison problem

2014-10-04 Thread Vincent Delecroix
Ok... not exactly what I said but even simpler. This is #17099 which needs review. Vincent 2014-10-04 20:31 UTC+02:00, Vincent Delecroix <20100.delecr...@gmail.com>: > Ok. The bug is in the canonicalize function of QuaternionAlgebra... > the function does not care about 0. This is "very optimized

Re: [sage-devel] QuaternionAlgebra comparison problem

2014-10-04 Thread Vincent Delecroix
Ok. The bug is in the canonicalize function of QuaternionAlgebra... the function does not care about 0. This is "very optimized" and "very wrong" ;-) I will provide a ticket in a minute. Vincent 2014-10-04 20:01 UTC+02:00, Vincent Delecroix <20100.delecr...@gmail.com>: > And more precisely a lac

Re: [sage-devel] QuaternionAlgebra comparison problem

2014-10-04 Thread Vincent Delecroix
And more precisely a lack of simplification at some point sage: w[0].denominator() 2 sage: z[0].denominator() 4 2014-10-04 19:57 UTC+02:00, Vincent Delecroix <20100.delecr...@gmail.com>: > Hello Nathann, > > Seems to be the comparison in the number field... > > sage: z[0] > -1/2 > sage: w[0] > -1

Re: [sage-devel] QuaternionAlgebra comparison problem

2014-10-04 Thread Vincent Delecroix
Hello Nathann, Seems to be the comparison in the number field... sage: z[0] -1/2 sage: w[0] -1/2 sage: z[0] == w[0] False sage: z[0].parent() Number Field in a with defining polynomial x^3 + x - 1 sage: w[0].parent() Number Field in a with defining polynomial x^3 + x - 1 Vincent 2014-10-04 19:4

Re: [sage-devel] QuaternionAlgebra comparison problem

2014-10-04 Thread William Stein
On Sat, Oct 4, 2014 at 10:44 AM, Nathan Dunfield wrote: > There's something wrong with comparison operators for elements of > QuaternionAlgebras defined over a number field. Here's a simple example, > where first it gives the wrong answer and then, after doing some arithmetic > with the elements,

[sage-devel] QuaternionAlgebra comparison problem

2014-10-04 Thread Nathan Dunfield
There's something wrong with comparison operators for elements of QuaternionAlgebras defined over a number field. Here's a simple example, where first it gives the wrong answer and then, after doing some arithmetic with the elements, a mix of right and wrong answers: sage: K = NumberField(x**3