Re: [sage-devel] Bug in FreeQuadraticModule.discriminant()

2016-08-31 Thread John Cremona
Indeed, that is a bug in line 371 of the file sage/ modules/free_quadratic_module.py -- an easy fix. Perhaps someone ought to look through all occurrences of ^ in .py files outside of docstrings (where they are OK thanks to preparsing). John On 31 August 2016 at 13:44, Simon Brandhorst wrote:

[sage-devel] Bug in FreeQuadraticModule.discriminant

2016-08-31 Thread Simon Brandhorst
{{{ sage: q=FreeQuadraticModule(ZZ,2,inner_product_matrix=1) sage: q Ambient free quadratic module of rank 2 over the principal ideal domain Integer Ring Inner product matrix: [1 0] [0 1] sage: q.determinant() 1 sage: q.discriminant() -2 }}} This output is wrong. The discriminant should be -1.

[sage-devel] Bug in FreeQuadraticModule.discriminant()

2016-08-31 Thread Simon Brandhorst
{ sage: q=FreeQuadraticModule(ZZ,2,inner_product_matrix=1) sage: q Ambient free quadratic module of rank 2 over the principal ideal domain Integer Ring Inner product matrix: [1 0] [0 1] sage: q.determinant() 1 sage: q.discriminant() -2 } #The expected value here is -1 The following example shoul