assert(0.1 + 0.2 != 0.3); // shall be true is my favorite check that a language uses native floating point arithmetic.
I saw some codes in slf4j as show below.I don\'t know why to avoid constant folding in here. Is it necessary to do that? or just best practice. what\'s the benefit of doing this?
This question already has answers here: 开发者_如何学Go Closed 12 years ago. Possible Duplicate: is there any concept called “Constant Folding” in java?