add optional epsilon to comparison functions

`0.0001` is a good default, but it's nice to have flexibility