nsdecimalnumber
NSDictionary losing decimal place at retrieval
I have a json string something like this \"{\"price\":1.0}\", using the json-framework I am converting 开发者_C百科this json string to NSDictionary.[详细]
2023-01-23 10:38 分类:问答objective c losing NSDecimalNumber value when accessed from another method
I am parsing Json Data into an NSDecimalNumber as follows 开发者_开发问答product.Price = [NSDecimalNumber decimalNumberWithDecimal:[[jProduct[详细]
2023-01-20 23:00 分类:问答how should nsdecimalnumber's be stored in the database?
What is the best way to store nsdecimalnumbers in a database? Numeric types like float, real and double are out, because it is important to preserve the precision for currency usage.[详细]
2023-01-20 10:30 分类:问答NSDecimalNumber round long numbers
I\'m trying to get NSDecimalNumber to print out large numbers, 15 or more digits.At 15 digits I see 111,111,111,111,111.Above 15 digits I see 1,111,111,111,111,110 even though the number being formatt[详细]
2023-01-16 15:56 分类:问答Raise an NSDecimalNumber to a negative power
I need an equivalent to C\'s pow() function that will work with NSDecimalNumbers. With pow you can use negative numbers e.g. pow(1514,-1234), with NSDecimal\'s decimalNumberByRaisingToPower: method, y[详细]
2023-01-14 13:57 分类:问答ceilf and floorf equivalent methods for NSDecimalNumber
Are there equivalent methods for ceilf and floorf for th开发者_高级运维e NSDecimalNumber type? I couldn\'t seem to find any.Simple solution: You can get the float value of the number object and call c[详细]
2022-12-29 18:19 分类:问答NSDecimalNumber subtraction
I need to subtract 0.5 from number a and set the answer to number b. My code looks like it would work but I\'m not sure what I\'m doing wrong. The error I get Is on the subtraction li开发者_StackOverf[详细]
2022-12-27 18:38 分类:问答NSDecimalNumber multiplication strangeness
ExclusivePrice, quantity are both NSDecimalNumbers. NSDecimalNumber *price = [exclusi开发者_StackOverflow社区vePrice decimalNumberByMultiplyingBy:quantity];[详细]
2022-12-25 09:45 分类:问答Objective-C - How To Remove Characters From a String?
I have a UILabel that has a formatted String (formatted for currency), so there is a dollar sign, $21.34.[详细]
2022-12-20 18:56 分类:问答How to display currency without rounding as string in Xcode?
I have trouble when I have currency value 999999999999999999.99 From that value, I want to display it as String. The problem is that value always rounded to[详细]
2022-12-19 01:31 分类:问答