This repository was archived by the owner on Jan 30, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -87,10 +87,10 @@ def simplify_sqrt_real(expr):
8787 sexpr = str (expr )
8888 if 'sqrt(' not in sexpr : # no sqrt to simplify
8989 return expr
90- if 'D[' in sexpr :
90+ if ( 'D[' in sexpr ) or ( 'diff(' in sexpr ) :
9191 return expr #!# the code below is not capable of simplifying
92- # expressions with symbolic derivatives denoted by Pynac
93- # symbols of the type D[0]
92+ # expressions with symbolic derivatives denoted
93+ # by Pynac symbols of the type D[0] or diff(...)
9494 # Lists to store the positions of all the top-level sqrt's in sexpr:
9595 pos_sqrts = [] # position of first character, i.e. 's' of 'sqrt(...)'
9696 pos_after = [] # position of character immediatelty after 'sqrt(...)'
@@ -203,6 +203,10 @@ def simplify_abs_trig(expr):
203203 sexpr = str (expr )
204204 if 'abs(sin(' not in sexpr : # nothing to simplify
205205 return expr
206+ if ('D[' in sexpr ) or ('diff(' in sexpr ):
207+ return expr #!# the code below is not capable of simplifying
208+ # expressions with symbolic derivatives denoted
209+ # by Pynac symbols of the type D[0] or diff(...)
206210 tp = []
207211 val = []
208212 for pos in range (len (sexpr )):
You can’t perform that action at this time.
0 commit comments