|
SOLUTIONS
|
BUILT-IN MATHEMATICA SYMBOL
ComplexityFunction
ComplexityFunction
is an option for Simplify and other functions which gives a function to rank the complexity of different forms of an expression.
DetailsDetails
- With the default setting ComplexityFunction->Automatic, forms are ranked primarily according to their LeafCount, with corrections to treat integers with more digits as more complex.
- Simplify[expr, ComplexityFunction->f] applies f to each intermediate expression generated by Simplify, treating the one which yields the smallest numerical value as simplest.
ExamplesExamplesopen allclose all
Basic Examples (2)Basic Examples (2)
The default ComplexityFunction counts the subexpressions and digits of integers:
| In[1]:= |
| Out[1]= |
LeafCount counts only the number of subexpressions:
| In[2]:= |
| Out[2]= |
By default this expression is not simplified:
| In[1]:= |
| Out[1]= |
This complexity function makes ChebyshevT more expensive than other functions:
| In[2]:= |
| In[3]:= |
| Out[3]= |
New in 3
Mathematica 9 is now available!
New to Mathematica?
Find your learning path »
Have a question?
Ask support »
