Open typischmann opened 9 years ago
The equality comparison between two float should be written as follows: if( (f1-f2)<epsilon){ ....... }
The epsilon should be a very small value, like 0.0000001
The equality comparison between two BigDecimal can be written as follows: if( bd1.compareTo(db2) == 0 ){ }
The equality comparison between two float should be written as follows: if( (f1-f2)<epsilon){ ....... }
The epsilon should be a very small value, like 0.0000001
The equality comparison between two BigDecimal can be written as follows: if( bd1.compareTo(db2) == 0 ){ }