[sage-support] Re: bug with sums of matrices

2008-09-16 Thread Pierre

cool !

now look for another bizarre bug report from me in a coming thread...

On Sep 15, 7:03 pm, "Craig Citro" <[EMAIL PROTECTED]> wrote:
> Pierre,
>
> You'll be happy to hear that I got the following response from the
> Singular team this morning:
>
> =
>
> Hello Craig Citro,
> thanks for the bug report.
> The bug is in the gcd computation for multivariate polynomials
> over a field extension: therefore it does not show up in the case
> of univariate polynomials or if all coefficients are in Q.
> The next Singular version (3-1-0) uses a different algorithm at that place,
> which is not affected by this error.
>
> Hans Schoenemann
>
> ==
>
> So it looks like this will be fixed on the other end soon ...
>
> -cc
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: bug with sums of matrices

2008-09-15 Thread Craig Citro

Pierre,

You'll be happy to hear that I got the following response from the
Singular team this morning:

=

Hello Craig Citro,
thanks for the bug report.
The bug is in the gcd computation for multivariate polynomials
over a field extension: therefore it does not show up in the case
of univariate polynomials or if all coefficients are in Q.
The next Singular version (3-1-0) uses a different algorithm at that place,
which is not affected by this error.

Hans Schoenemann

==

So it looks like this will be fixed on the other end soon ...

-cc

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: bug with sums of matrices

2008-09-11 Thread Craig Citro

> don't worry about that, i've found a way to do my computation
> (everything happens in fact in a ring of laurent polynomials, so i've
> worked with them instead of the full ring of rational functions). I
> just wanted to report the bug.
>

Thanks for reporting it, and helping track it down!

-cc

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: bug with sums of matrices

2008-09-11 Thread Pierre

thanks for all this !

> For the record, though, people on this list definitely respond faster
> if you try to whittle down your examples to the smallest case you can
> find that creates the error.

I know. I just had no idea whatsoever which matrices would create the
error ! in fact it took quite an effort (several hours...) just to
realize it was something to do with summing matrices, originally there
was just some result far away that wasn't correct.

> Sorry I don't have a workaround, but I hear the Singular people are
> usually quite quick to respond.

don't worry about that, i've found a way to do my computation
(everything happens in fact in a ring of laurent polynomials, so i've
worked with them instead of the full ring of rational functions). I
just wanted to report the bug.

thanks again!
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: bug with sums of matrices

2008-09-11 Thread Craig Citro

Hi Pierre,

> perhaps i should have posted to sage-devel instead ? i don't even know
> how to "properly" report a bug.
>

No, this was the right place to report the bug. Probably no one has
responded just because no one has had a chance to look at the bug. I
just went ahead and took a look, and it turns out this is actually a
bug in Singular! Here's a simpler bit of code that is creating the
underlying error (or, at least, the first underlying error):

sage: K. = CyclotomicField(4) ; R. = K[]
sage: x = (7+I)*x1^2*x2*x3*x4 + x1*x2^2*x3*x4 + x1*x2*x3^2*x4 + x1*x2*x3*x4^2
sage: y = x1*x2*x3*x4
sage: x.gcd(y)
(I - 7)*x1^2*x2*x3*x4

We just call singular for this; in fact, here's the same bug in
singular (thanks to Martin Albrecht for translating this for me):

> ring r = (0,I),(x0,x1,x2,x3,x4),dp;
> minpoly = I^2 + 1;
> poly x = (7+I)*x1^2*x2*x3*x4 + x1*x2^2*x3*x4 + x1*x2*x3^2*x4 + x1*x2*x3*x4^2;
> poly y = x1*x2*x3*x4;
> gcd(x,y);
(I-7)*x1^2*x2*x3*x4

I'm going to go ahead and report this upstream; I'll reply to this
thread again when I find out what they say.

For the record, though, people on this list definitely respond faster
if you try to whittle down your examples to the smallest case you can
find that creates the error.

Sorry I don't have a workaround, but I hear the Singular people are
usually quite quick to respond.

-cc

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: bug with sums of matrices

2008-09-11 Thread Pierre

perhaps i should have posted to sage-devel instead ? i don't even know
how to "properly" report a bug.

On 10 sep, 18:53, Pierre <[EMAIL PROTECTED]> wrote:
> hi there,
>
> i thought i'd report this bug, even though it's hard to reproduce and
> not well-identified. I have a ring R of type:
>
> Fraction Field of Multivariate Polynomial Ring in x0, x1, x2, x3, x4,
> x0_iv, x1_iv, x2_iv, x3_iv, x4_iv over Cyclotomic Field of order 4 and
> degree 2
>
> (the _iv variables will play no role in the sequel -- not that it
> matters.)
>
> And I have a list L of 64 matrices in MatrixSpace(R, 2).
> When i try sum(L), I get:
>
> /home/pedro/Bureau/sage-3.0.2-ubuntu32-intel-i686-Linux/local/lib/
> python2.5/site-packages/sage/rings/fraction_field_element.py in
> _add_(self, right)
> 298 numer = numer // new_gcd
> 299 denom = denom // new_gcd
> --> 300 return FractionFieldElement(self.parent(),
> numer, denom, coerce=False, reduce=False)
> 301 # else: no reduction necessary
> 302 except AttributeError: # missing gcd or quo_rem,
> don't reduce
>
> /home/pedro/Bureau/sage-3.0.2-ubuntu32-intel-i686-Linux/local/lib/
> python2.5/site-packages/sage/rings/fraction_field_element.py in
> __init__(self, parent, numerator, denominator, coerce, reduce)
>  65 pass
>  66 if self.__denominator.is_zero():
> ---> 67 raise ZeroDivisionError, "fraction field element
> division by zero"
>  68
>  69 def reduce(self):
>
> ZeroDivisionError: fraction field element division by zero
>
> (This is sage 3.1.1 despite the folder name.)
>
> If i try to do a for loop and sum the matrices one by one, i realize
> that the problem is with the addition of sum(L[:49]) (call it M) and
> L[49] (call it N). I can compute them separately and get the same
> error message by trying M+N.
>
> Of course you'd like to see M and N. Well be ready for a
> disappointment: M is
>
> [  ((37/32*I - 5/16)*x0^2*x1*x2*x3 + (-5/64*I + 7/32)*x1*x2^2*x3^2 +
> (-19/32*I + 7/16)*x0^2*x1*x2*x4 + (-9/32*I - 1/16)*x0^2*x1*x3*x4 +
> (-5/32*I + 13/16)*x0^2*x2*x3*x4 + (-19/8*I - 89/16)*x1^2*x2*x3*x4 +
> (15/32*I - 3/8)*x1*x2^2*x3*x4 + (31/64*I - 27/64)*x2^3*x3*x4 +
> (-31/32*I + 5/16)*x1*x2*x3^2*x4 + (21/32*I - 13/64)*x2*x3^3*x4 +
> (-5/16*I + 15/64)*x1*x2^2*x4^2 + (-3/32*I + 1/4)*x1*x2*x3*x4^2 +
> (-7/64*I + 3/64)*x1*x3^2*x4^2 + (13/64*I + 5/8)*x2*x3*x4^3)/
> (x1*x2*x3*x4)  ((5/32*I - 11/32)*x0^2*x1*x2*x3 + (1/8*I -
> 1/4)*x1*x2^2*x3^2 + (7/32*I + 15/32)*x0^2*x1*x2*x4 + (3/32*I -
> 1/32)*x0^2*x1*x3*x4 + (9/32*I - 3/32)*x0^2*x2*x3*x4 + (-29/32*I +
> 303/128)*x1^2*x2*x3*x4 + (5/16*I + 11/16)*x1*x2^2*x3*x4 + (-1/64*I +
> 29/128)*x2^3*x3*x4 + (11/8*I + 1/8)*x1*x2*x3^2*x4 + (21/64*I -
> 13/128)*x2*x3^3*x4 + (-17/64*I - 7/32)*x1*x2^2*x4^2 + (-7/8*I +
> 7/8)*x1*x2*x3*x4^2 + (-9/64*I - 7/64)*x1*x3^2*x4^2 + (5/16*I -
> 13/128)*x2*x3*x4^3)/(x1*x2*x3*x4)]
> [((-5/32*I + 11/32)*x0^2*x1*x2*x3 + (-1/8*I + 1/4)*x1*x2^2*x3^2 +
> (-7/32*I - 15/32)*x0^2*x1*x2*x4 + (-3/32*I + 1/32)*x0^2*x1*x3*x4 +
> (-9/32*I + 3/32)*x0^2*x2*x3*x4 + (-267/32*I + 161/128)*x1^2*x2*x3*x4 +
> (-5/16*I + 23/16)*x1*x2^2*x3*x4 + (1/64*I - 29/128)*x2^3*x3*x4 +
> (-1/8*I + 3/2)*x1*x2*x3^2*x4 + (-21/64*I + 13/128)*x2*x3^3*x4 +
> (17/64*I + 7/32)*x1*x2^2*x4^2 + (7/8*I + 7/4)*x1*x2*x3*x4^2 + (9/64*I
> + 7/64)*x1*x3^2*x4^2 + (-5/16*I + 13/128)*x2*x3*x4^3)/(x1*x2*x3*x4)
> ((47/32*I - 7/8)*x0^2*x1*x2*x3 + (5/64*I + 15/32)*x1*x2^2*x3^2 +
> (47/32*I + 3/4)*x0^2*x1*x2*x4 + (-15/32*I + 1/2)*x0^2*x1*x3*x4 +
> (-27/32*I + 1/2)*x0^2*x2*x3*x4 + (41/8*I + 49/16)*x1^2*x2*x3*x4 +
> (-13/32*I + 1/16)*x1*x2^2*x3*x4 + (-27/64*I - 31/64)*x2^3*x3*x4 +
> (33/32*I + 13/8)*x1*x2*x3^2*x4 + (21/32*I - 13/64)*x2*x3^3*x4 + (1/8*I
> - 29/64)*x1*x2^2*x4^2 + (-83/32*I - 15/16)*x1*x2*x3*x4^2 + (-1/64*I -
> 25/64)*x1*x3^2*x4^2 + (-13/64*I - 5/8)*x2*x3*x4^3)/(x1*x2*x3*x4)]
>
> while N is
>
> [ 
>   
>   
>   
>   
> 0
> ((-5/32*I + 11/32)*x0^2*x1*x2*x3 + (-1/8*I + 1/4)*x1*x2^2*x3^2 +
> (-7/32*I - 15/32)*x0^2*x1*x2*x4 + (-3/32*I + 1/32)*x0^2*x1*x3*x4 +
> (-9/32*I + 3/32)*x0^2*x2*x3*x4 + (23/32*I + 129/128)*x1^2*x2*x3*x4 +
> (1/2*I - 3/16)*x1*x2^2*x3*x4 + (1/64*I - 29/128)*x2^3*x3*x4 + (-3/16*I
> + 3/8)*x1*x2*x3^2*x4 + (-21/64*I + 13/128)*x2*x3^3*x4 + (17/64*I +
> 7/32)*x1*x2^2*x4^2 + (1/16*I + 1/4)*x1*x2*x3*x4^2 + (9/64*I +
> 7/64)*x1*x3^2*x4^2 + (-5/16*I + 13/128)*x2*x3*x4^3)/(x1*x2*x3*x4)]
> [  ((5/32*I - 11/32)*x0^2*x1*x2*x3 + (1/8*I - 1/4)*x1*x2^