I searched for this but could not find it on google. Is there a way in sage to determine the size of expression as given typically by leaf count? Similar to what is documented in Mathematica leafCount[] here
http://reference.wolfram.com/language/ref/LeafCount.html "gives the total number of indivisible subexpressions in expr." And also similar to Maple's http://www.maplesoft.com/support/help/Maple/view.aspx?path=MmaTranslator/Mma/LeafCount&term=leafcount I need a way to measure the size of resulting expression from sage to compare it with Mathematica's result and Maple's as well. I currently use leafCount() for this since both Maple and Mathematica have this function. Does sage have similar function or another way to obtain this measure? For example, given this expression (c + integrate(e^(2*x + sin(x)), x))*e^(-sin(x)) Then in Mathematica I would write Clear[x, c]; expr = (c + Integrate[Exp[2*x + Sin[x]], x])*Exp[-Sin[x]]; LeafCount[expr] 19 thanks --Nasser -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
