A bug in Sympy qfbsolve?

35 views
Skip to first unread message

Rolandb

unread,
Dec 6, 2014, 3:20:53 PM12/6/14
to sage-s...@googlegroups.com, Thilina Rathnayake
Hi, please look at the following unexpected behavior:

sage: from sympy.solvers.diophantine import *
sage: w=gp.Qfb(1,0,-16).qfbsolve(17)
sage: print w
Traceback (most recent call last):
...
TypeError: Error executing code in GP:
CODE:
	sage[26]=Qfb(sage[23],sage[24],sage[25]);
PARI/GP ERROR:
  ***   at top-level: sage[26]=Qfb(sage[23],sage[24
  ***                          ^--------------------
  *** Qfb: domain error in Qfb: issquare(disc) = 1

Roland

Vincent Delecroix

unread,
Dec 6, 2014, 5:06:09 PM12/6/14
to sage-s...@googlegroups.com
The line
sage: from sympy.solvers.diophantine import *
has nothing to do with the problem.

The problematic line is
sage: gp.Qfb(1,0,-16)
which should initialize a quadratic form. But you get a relatively
explicit error from Pari/gp
? Qfb(1,0,-16)
*** at top-level: Qfb(1,0,-16)
*** ^------------
*** Qfb: domain error in Qfb: issquare(disc) = 1
*** Break loop: type 'break' to go back to GP prompt
which tell you that you can not initialize a quadratic form for which
the discriminant is a square. And with your form the discriminant is
64.

Vincent

2014-12-06 21:20 UTC+01:00, Rolandb <roland.va...@gmail.com>:
> --
> You received this message because you are subscribed to the Google Groups
> "sage-support" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-support...@googlegroups.com.
> To post to this group, send email to sage-s...@googlegroups.com.
> Visit this group at http://groups.google.com/group/sage-support.
> For more options, visit https://groups.google.com/d/optout.
>
Reply all
Reply to author
Forward
0 new messages