Convert.ToDouble is adding zeros and 1 like in this picture:

Why it is turning from 21.62 to 21.620000000000001 ?
Is this about floating point issue?
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.
Double (and Float) are floating-point types, and in a binary system will have some imprecision.
If you need more precise comparisons use
decimalinstead. If you’re just doing calculationsdoubleshould be fine. If you need to compare doubles for absolute equiality then compare the absolute value of the difference to some small constant: