Ability to specify tolerance. Default tolerance=0

0.001 was not enough for some cases, so we are switching to
Number.MIN_VALUE by default (0 does not work properly).
`tolerance` setting can be used to tweak it.