Determine the unique roots and their multiplicities in two lists
Inputs:
p – The list of roots tol — The tolerance for two roots to be considered equal. rtype — How to determine the returned root from the close
- ones: ‘max’: pick the maximum
- ‘min’: pick the minimum ‘avg’: average roots
Outputs: (pout, mult)
pout – The list of sorted roots mult – The multiplicity of each root