Make default CostEvaluator work with arbitrary numeric types
Merge pull request #3522 from jexp/2.1-maint

Make default CostEvaluator work with arbitrary numeric types