objective c - Problem with NSNumber (double values are off by 1) -


i'm getting following output , i've no idea why!? resulting number off 1.

i thought double's can handle massive numbers? i'm sure i'm not understanding correctly! appreciated.

(gdb) print (double) [[nsnumber numberwithdouble:9606977671929857.0] doublevalue] $13 = 9606977671929856 

many thanks!

you've exhausted precision of double-precision floating point type, has room 14 significant digits in decimal notation.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -