user-defined comparison callback can return floats (test included)

I think we could make it possible to return floats from user-defined comparison callbacks. Here's the PR which adds this feature.