Refactoring

* distances -> affinities
* use MACHINE_EPSILON from numpy
* use double precision in binary search