Top "Nsdecimalnumber" questions

NSDecimalNumber, an immutable subclass of NSNumber, provides an object-oriented wrapper for doing base-10 arithmetic.

Swift 3 : Decimal to Int

I tried to convert Decimal to Int with the follow code: Int(pow(Decimal(size), 2) - 1) But I get: .swift:254:43: …

ios swift swift3 nsdecimalnumber
Converting NSDecimalNumber to NSString

I'm retrieving a key from an object that looks like this: po obj { TypeID = 3; TypeName = Asset; } The key value is …

objective-c ios cocoa-touch nsstring nsdecimalnumber
Convert NSNumber to NSDecimalNumber

I realize that NSDecimalNumber inherits from NSNumber. However, I am struggling to figure out how I can init an NSDecimalNumber …

objective-c init nsnumber nsdecimalnumber
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. In the …

iphone objective-c formatting nsdecimalnumber
Different ways of comparing NSDecimalNumber

For example, with primitive, I'll do this if ( (x >= 6000) && (x <= 20000) ) // do something here and with NSDecimalNumber, …

objective-c ios nsdecimalnumber
Convert NSString to NSDecimalNumber

In my Core Data model, "amount" is an attribute in entity "Tracking". How do I convert amount to NSDecimalNumber throughout …

xcode core-data nsstring nsdecimalnumber
How do I add NSDecimalNumbers?

OK this may be the dumb question of the day, but supposing I have a class with : NSDecimalNumber *numOne = [NSDecimalNumber …

iphone objective-c nsdecimalnumber
Convert String to NSDecimalNumber

I try to convert a String into a NSDecimalNumber here it my code: class func stringToDecimal (dataToDecimal: String) -> …

ios string swift nsdecimalnumber
NSDecimal vs Float (iOS)

I've come across some blogs and forum posts where people say one should use NSDecimalNumber instead of floats when dealing …

iphone objective-c nsdecimalnumber
NSDecimalNumber zeros following decimal point (iPhone SDK)

I have the following code (...) numberStyle = [NSDecimalNumberHandler decimalNumberHandlerWithRoundingMode:NSRoundPlain scale:2 raiseOnExactness:NO raiseOnOverflow:NO raiseOnUnderflow:NO raiseOnDivideByZero:NO]; strThree = textFieldThree.…

ios nsdecimalnumber