Implement approximate floating point comparison in terms of ULPs

For comparing against values != 0 using the distance in units of least
precision is more robust than an absolute tolerance and avoids numeric
issues with relative tolerances.

See: http://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition