Having just done a whole semester of calculus in a single page of code, it is time to test it:
(deriv '(+ (* m x) b) 'x) (+ (+ (* M 1) (* X 0)) 0)This result is mathematically correct; however, it clearly leaves something to be desired. We would like to get just M as the result.
Fortunately, Lisp supports incremental program development: write an initial version of a program, try it, and fix it if it isn't quite right. We need to replace our functions s+ and s* with versions that perform symbolic simplification.
Contents    Page-10    Prev    Next    Page+10    Index