Changes between Version 3 and Version 4 of Ticket #16590


Ignore:
Timestamp:
Jun 30, 2014, 9:26:46 AM (8 years ago)
Author:
Ralf Stephan
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #16590

    • Property Cc John Cremona added
  • Ticket #16590 – Description

    v3 v4  
    99
    1010It is however not possible to directly make the resp. sympy functions fully usable with Sage, from within Sage. If desired that must be done in sympy.
     11
     12Until then there is the following workaround:
     13{{{
     14sage: from sympy.solvers.diophantine import *
     15sage: from sympy import sympify
     16sage: var('x,y,m')
     17(x, y, m)
     18sage: diop_solve(sympify(x**2 + y**2 - 5))
     19{(-2, -1), (-2, 1), (2, -1), (2, 1)}
     20sage: diop_solve(sympify(x**2 - 3*y**2 - 1))
     21{(-sqrt(3)*(-sqrt(3) + 2)**t/2 + (-sqrt(3) + 2)**t + sqrt(3)*(sqrt(3) + 2)**t/2 + (sqrt(3) + 2)**t,
     22  -sqrt(3)*(-sqrt(3) + 2)**t/3 + (-sqrt(3) + 2)**t/2 + (sqrt(3) + 2)**t/2 + sqrt(3)*(sqrt(3) + 2)**t/3)}
     23}}}