add optional epsilon to comparison functions