FeynCalc manual (development version)

NTerms

NTerms[x] is equivalent to Length if x is a sum; otherwise NTerms[x] returns 1, except NTerms[0] -> 0.

See also

Overview

Examples

NTerms[a - b]

2

NTerms[a b c]

1

NTerms[9]

1

NTerms[0]

0