newRPL  build 1255 released! [updated to 1299]

12172018, 05:46 PM
Post: #324




RE: newRPL  build 1089 released! [update:build 1127]
(12172018 05:13 PM)The Shadow Wrote: Very nice! I suppose if you wanted to expand DER to handle SIN and COS, you'd have to use RULEAPPLY1, right? Otherwise you'd get an infinite loop. You don't need to worry about infinite recursion, the rule would be: Code:
Since the COS is not inside DER(...) anymore, there's no issue with recursion. You do need independent rules for SIN, COS, and many others (this was just a humble example of what's possible, wasn't meant to be a proper derivative implementation). By including generic functions '.xU' in the rules, rather than individual variables, the chain rule is already implemented. The next pass of RULESAPPLY will operate on the new DER(...) term until you end up with DER(constant,x)=0 or DER(x,x)=1. This simplified example is lacking some important things, for example I did not include a generic multiplication rule: Code:
in case the polynomial is factored, for example. This will take the first multiplicand ('.xU' would match one term in a multiplication, whatever subexpression it may contain) and isolate it from the rest of the expression ('.XV' will match all other multiplicands grouped together), and work its way recursively until all multiplicands have been separated. 

« Next Oldest  Next Newest »

User(s) browsing this thread: 1 Guest(s)