MoNoXiDe commented on a Page, Equation Solver - $solve  -  Dec 21, 2007

Wow thanks a lot! I added the code (under the trans alias) and you in the credits :)

Updated it guys.

Unfortunately I found another bug, if you have more than one function in the code, the solver doesn\'t work. So if you try to solve (sinx)(cosx)=0.2 no luck. I rooted the problem to be the with parser, after it sorts out the first function, it doesn\'t continue to the next one, it just stops.

The parser does this: $parser(sin(30)-3.4) returns 0.5-3.4 and then you can put that into $calc. However if you do (sin(30)+sin(30)-3.4), it returns 0.5+0-3.4. I really have no idea how to solve it. the stript function doesn\'t need any editing, it\'s just the regsubex of the parser, but I have no idea how to do it, I know next to nothing about regex now.

alias parser return $regsubex($regsubex($1,/(?<=sin|asin|acos|atan|cos|tan|log|sqrt)(\\\\d+)/g,(\\\\t)),/((?:sin|asin|acos|atan|cos|tan|log|sqrt).+?\\\\051)/g,$($ $+ $stript(\\\\t,1) $+ $chr(40) $+ $stript(\\\\t) $+ $chr(41) $+ .deg,2)).

It\'s not that important anyway, but just would be nice to have a complete solver. Thanks a lot for before though TropNul :)

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.