Why is 0 less than Number.MIN_VALUE in JavaScript?
问题 Using Node.js, I'm evaluating the expression: 0 < Number.MIN_VALUE To my surprise, this returns true . Why is that? And: How can I get the smallest number available for which the comparison works as expected? 回答1: Number.MIN_VALUE is 5e-324 , i.e. the smallest positive number that can be represented within float precision, i.e. that's as close as you can get to zero. It defines the best resolution floats give you. Now the overall smallest value is Number.NEGATIVE_INFINITY although that's not