Comparing those two values shall result in a “true”:
53.9173333333333 53.9173
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you want
a = 1.00001andb = 0.99999be identified as equal:Otherwise, if you want
a = 1.00010andb = 1.00019be identified as equal, and bothaandbare positive and not huge:Otherwise, use the
truncatemethod as shown in Are there any functions for truncating a double in java?: