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
Post a Comment