That is how Double type works: it has only 16 significant digits of precision. You need to use some arbitrary precision decimal class, like System.Decimal or something similar.