When I do: sage: A=matrix(QQ,3,3,[-3,2,0 , 2,3,-2 , 0,-2,5 ]) sage: Q=QuadraticForm(2*A) sage: Q Quadratic form in 3 variables over Rational Field with coefficients: [ -3 4 0 ] [ * 3 -4 ] [ * * 5 ]
If I try to get the diagonal form: sage: Q.rational_diagonal_form() Quadratic form in 3 variables over Rational Field with coefficients: [ -3 -32 5184 ] [ * -81 26240 ] [ * * -2125111 ] which is clearly not diagonal... or: sage: Q.rational_diagonal_form().Gram_matrix() [ -3 -16 2592] [ -16 -81 13120] [ 2592 13120 -2125111] the signature() method uses rational_diagonal_from() so it is also gives strange results: sage: Q.signature() -3 where: sage: Q.Gram_matrix().eigenvalues() [-3.646808552172955?, 2.284147264963001?, 6.362661287209955?] sage: Q.matrix().eigenvalues() [0, -11.47177122123975?, -1.409895056381797?, 10.88166627762154?] I want to confirm that this is a bug, because I have written a fix that works the way I believe it should. Luis Berlioz --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---