I've seen posts like:
What is the most effective way for float and double comparison?
And many other related posts.
I saw in d3js library, it uses the following comparison:
return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;
Is it OK to use this in C/C++ to do the comparison of double
and float
?
No comments:
Post a Comment