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

Add email recipient to all new Trac tickets -

400 Bad Request on Apache/PHP AddHandler wrapper -

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