Module testderiv %% Test the derivative program. Import "deriv". ==================================================== %% Simplify tests ==================================================== {ShowSimplify(e). = Displayln "%(e) = %(simplify e)". } Execute Writeln["Simplify tests\n--------------"]. ShowSimplify constant(2) + constant(5). ShowSimplify constant(2) + constant(5) + constant(6). ShowSimplify xx + constant(0). ShowSimplify constant(0) + xx. Writeln. %Execute ==================================================== %% Deriv tests ==================================================== {ShowDeriv(e). = Displayln "(%(e))' = %(derivative(e))". } Execute Writeln["Deriv tests\n----------"]. ShowDeriv constant(4) + xx. ShowDeriv xx + xx. %Execute %Module