0

I could not use the full range of double data type with precession.

My requirement is, I need to increment precession of double data type range within its range. e.g.

double number = 12345678912345678.0;

number = number + 0.00001;

I expect number should be 12345678912345678.00001, but actual result is 12345678912345678.0.

In the snap attached I have a 17 digit ,14 digit and 12 digit keys, For each key I am incrementing some precession number say 0.00001. But this operation did not incrementing the precession for 17 and 14 digit keys .so that I am in trouble using these values in SortedList which does not allow duplicates.

example code and out put snap

Matt Rowland
  • 4,575
  • 4
  • 25
  • 34
Phaniram
  • 29
  • 5

0 Answers0