@@ -1692,15 +1692,16 @@ def _inverse_laplace_latex_(self, *args):
1692
1692
1693
1693
#######################################################
1694
1694
1695
- symtable = {'%pi' :'pi' , '%e' : 'e' , '%i' :'I' , '%gamma' :'euler_gamma' }
1695
+ symtable = {'%pi' :'pi' , '%e' : 'e' , '%i' :'I' , '%gamma' :'euler_gamma' ,
1696
+ 'e' :'_e' , 'i' :'_i' , 'I' :'_I' }
1696
1697
1697
1698
import re
1698
1699
1699
1700
maxima_tick = re .compile ("'[a-z|A-Z|0-9|_]*" )
1700
1701
1701
1702
maxima_qp = re .compile ("\?\%[a-z|A-Z|0-9|_]*" ) # e.g., ?%jacobi_cd
1702
1703
1703
- maxima_var = re .compile ("\% [a-z|A-Z|0-9|_]*" ) # e.g., ? %jacobi_cd
1704
+ maxima_var = re .compile ("[a-z|A-Z|0-9|_\% ]*" ) # e.g., %jacobi_cd
1704
1705
1705
1706
sci_not = re .compile ("(-?(?:0|[1-9]\d*))(\.\d+)?([eE][-+]\d+)" )
1706
1707
@@ -1765,13 +1766,21 @@ def symbolic_expression_from_maxima_string(x, equals_sub=False, maxima=maxima):
1765
1766
sage: solve([2*x==3, x != 5], x)
1766
1767
[[x == (3/2), (-7/2) != 0]]
1767
1768
1768
- Check that some variables don't end up as special constants (:trac:`6882`)::
1769
+ Check that some hypothetical variables don't end up as special constants (:trac:`6882`)::
1769
1770
1770
1771
sage: from sage.calculus.calculus import symbolic_expression_from_maxima_string as sefms
1771
1772
sage: sefms('%i')^2
1772
1773
-1
1773
1774
sage: ln(sefms('%e'))
1774
1775
1
1776
+ sage: sefms('i')^2
1777
+ _i^2
1778
+ sage: sefms('I')^2
1779
+ _I^2
1780
+ sage: sefms('ln(e)')
1781
+ ln(_e)
1782
+ sage: sefms('%inf')
1783
+ +Infinity
1775
1784
"""
1776
1785
syms = sage .symbolic .pynac .symbol_table .get ('maxima' , {}).copy ()
1777
1786
0 commit comments