# HG changeset patch
# User Michael Boratko <boratko@gmail.com>
# Date 1321550251 18000
# Node ID 2921ac5c16ef8691f47fc3abcf0924f1c4242f7f
# Parent 540f1f6a45d6ce46157ca726092ac6ac76e6a7f1
trac 11941: limited workaround for assumption and solve
diff --git a/sage/symbolic/assumptions.py b/sage/symbolic/assumptions.py
|
a
|
b
|
|
| 1 | 1 | from sage.structure.sage_object import SageObject |
| 2 | 2 | from sage.rings.all import ZZ, QQ, RR, CC |
| 3 | 3 | from sage.symbolic.ring import is_SymbolicVariable |
| | 4 | from sage.interfaces.maxima_lib import maxima |
| | 5 | from sage.misc.sage_eval import sage_eval |
| 4 | 6 | _assumptions = [] |
| 5 | 7 | |
| 6 | 8 | class GenericDeclaration(SageObject): |
| … |
… |
|
| 203 | 205 | value = soln.rhs() |
| 204 | 206 | else: |
| 205 | 207 | return False |
| | 208 | maxima.eval('domain: real') |
| | 209 | value_real = maxima.eval(str(value)) |
| | 210 | maxima.eval('domain: complex') |
| | 211 | try: |
| | 212 | value = sage_eval(value_real) |
| | 213 | except: |
| | 214 | pass |
| 206 | 215 | try: |
| 207 | 216 | CC(value) |
| 208 | 217 | except: |