TropNul commented on a Page, Equation Solver - $solve  -  Dec 23, 2007

In the trans function there are these 2 lines which could be optimized a bit imho.

%eq = $regsubex(%eq,/(\\\\d)x/g,\\\\t*x)
%eq = $regsubex(%eq,/(\\\\d[a-z])/g,$remove(\\\\t,$regsubex(\\\\t,\\\\d+,\\\\t)) $+ * $+ $regsubex(\\\\t,\\\\d+,\\\\t))

Basically, both of them does the same thing, except for the first which considers only the \'x\' character after a digit.

They could be replaced by this single line.

%eq = $regsubex(a,%eq,/(\\\\d)([a-z])/g,\\\\1*\\\\2)

;o)

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.