1. A method for automatically computing a derivative of a numerical expression within a digital computer system, comprising: receiving a representation of the numerical expression within the digital computer system, wherein the numerical expression includes one or more independent variables; forming an expression tree for the derivative of the numerical expression with respect to an independent variable, wherein the expression tree makes use of temporary variables to form results of sub-expressions for computing the derivative of the numerical expression; and wherein forming the expression tree involves seeking to introduce only temporary variables and associated sub-expressions as necessary to eliminate repeated common sub-expressions, thereby substantially minimizing the number of temporary variables; and using the expression tree to compute the derivative of the numerical expression during a computation.