You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
sicp-all-tasks/sicp/2_002e56

60 lines
840 B

Exercise 2.56: Show how to extend the basic
differentiator to handle more kinds of expressions. For instance, implement
the differentiation rule
d
(
u
n
)
d
x
=
n
u
n
1
d
u
d
x
by adding a new clause to the deriv program and defining appropriate
procedures exponentiation?, base, exponent, 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.