add compare method to compare floats with a given epsilon