Reorganise cp.
Merge pull request #41 from kud/formula.cp

Add cp.