SICP Exercise 2.56 differentiation rule

Exercise 2.56.  Show how to extend the basic differentiator to handle more kinds of expressions. For instance, implement the differentiation rule


by adding a new clause to the deriv program and defining appropriate procedures exponentiation?baseexponent, and make-exponentiation. (You may use the symbol ** to denote exponentiation.) Build in the rules that anything raised to the power 0 is 1 and anything raised to the power 1 is the thing itself.

SOLUTION


The code and tests are here.

Comments

Popular posts from this blog

SICP Exercise 4.9 do for while until

SICP Exercise 3.56 merge streams

SICP Exercise 2.49 segments-painter