iphone - How Core Data save NSNnumber data without rounding the decimal part in Objective-C -


i trying save decimal number core data nsnumber object decimal value had saved rounding digits when enter 5 digit number decimal part.

if enter 9999,999 getting save same value database in case of 5 digit (e.g.,10000.999) save 10001 in database.

chargefloat=10000.999;  value.fees      = [nsnumber numberwithfloat:chargefloat];//value entity object                                                           //fees nsnumber 

but in database showing value 10001.

i need solution.

floats give 6 9 significant digits, doubles give 15 17 significant digits , nsdecimal gives 38 significant digits. suggest either use doubles of nsdecimals.


Comments

Popular posts from this blog

Winapi c++: DialogBox hangs when breaking a loop -

vb.net - Font adding using PDFsharp -

javascript - jQuery iScroll clickable list elements while retaining scroll? -