Wolfram ResearchPRODUCTSPURCHASEFOR USERSCOMPANYOUR SITES
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.

LeafCount

Usage

LeafCount[expr] gives the total number of indivisible subexpressions in expr.


Notes

LeafCount gives a measure of the total "size" of an expression.
LeafCount counts the number of subexpressions in expr which correspond to "leaves" on the expression tree.
• Example: LeafCount[1 + a + b^2]LongRightArrow .
LeafCount is based on FullForm representation of expressions.
• Numbers with heads Rational and Complex are treated as composite objects, just as in FullForm.
• See also: ByteCount, Length, Depth, AtomQ.
• New in Version 1.


Any questions about topics on this page? Click here to get an individual response.Buy NowFree TrialMore Information



 © 2009 Wolfram Research, Inc.  Terms of Use  Privacy Policy |
Sign up for our newsletter: