3 ms·
That does not provide an ULP distance function, rather it tests for approximate equality while using both relative and absolute error margins. Also, a warning:
by nsajko 6y ago
That does not provide an ULP distance function, rather it tests for approximate equality while using both relative and absolute error margins.
Also, a warning: the code behaves as if numbers of opposite sign are never "approximately equal". Also, the documentation sucks: it doesn't even mention the sign issue, nor does it mention how NaN values are handled, but it nevertheless contains irrelevant anecdotes.