Iphone – execute the NSDecimalCompact() function on every NSDecimal I create

cocoa-touchiphoneuikit

The documentation confuses me about this. They say:

void NSDecimalCompact (
   NSDecimal *number
);

Discussion Formats number so that
calculations using it will take up as
little memory as possible. All the
NSDecimal… arithmetic functions
expect compact NSDecimal arguments.

The last part is important:

All the
NSDecimal… arithmetic functions
expect compact NSDecimal arguments.

So that means, that I have to execute NSDecimalCompact() on every NSDecimal, every time I provide it as a parameter to one of the NSDecimal… arithmetic functions? Or would I do that only once when creating the NSDecimal?

Best Answer

You do not need to call NSDecimalCompact(), the results from NSDecimal..() functions are compact as long as the return value is NSCalculationNoError.