示例#1
0
 void CosExpression::cacheDerivative(Int withRespectToIndex) const
{
  derivative = ref<ExpressionNode>( NewObj NegateExpression(ref<ExpressionNode>( 
					NewObj ProductExpression( ref<ExpressionNode>(NewObj SinExpression(arg)),
                                                                  arg->differentiate(withRespectToIndex)) ) ) ); 
  derivWithRespToIndex = withRespectToIndex;
  derivCached = true;
}