yes, indeed this is a bug. Thanks for reporting.

Would you like to make the next step to solve that ? Then you should ask 
for an account on trac.sagemath.org and open a ticket.

Instructions are available here: 
http://www.sagemath.org/git-developer-guide/

Frederic

Le mercredi 31 août 2016 15:38:17 UTC+2, Simon Brandhorst a écrit :
>
> {{{
> 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. 
>
> The following is another related bug. I guess thats where the error of the 
> first bug lies as well.
>
>
> {{{
> sage: q=FreeQuadraticModule(QQ,2,inner_product_matrix=1)
> sage: q.determinant()
> 1
> sage: q.discriminant()
> ---------------------------------------------------------------------------
> RuntimeError                              Traceback (most recent call last)
> <ipython-input-204-22cd2398c8db> in <module>()
> ----> 1 q.discriminant()
>
> /usr/lib/sagemath/local/lib/python2.7/site-packages/sage/modules/free_quadratic_module.pyc
>  
> in discriminant(self)
>     377         else:
>     378             r = (n-1)//2
> --> 379         return (-1)^r*self.gram_matrix().determinant()
>     380 
>     381     def gram_matrix(self):
>
> sage/structure/element.pyx in sage.structure.element.Element.__xor__ 
> (/usr/lib/sagemath//src/build/cythonized/sage/structure/element.c:8229)()
>
> RuntimeError: Use ** for exponentiation, not '^', which means xor
> in Python, and has the wrong precedence.
> }}}
>
> This occurred on two different machines running sage 7.0 and 7.2 on Ubuntu 
> 14.04.4 LTS and Fedora 24
> (both x64).
>
> Sorry if this is not following some conventions ... it is my first bug 
> report. 
>

-- 
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...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to