Structure

NSDecimal

A structure representing a base-10 number.

Declaration

typedef struct NSDecimal;

Topics

Creating a Decimal from Another Decimal

NSDecimalCopy

Copies the value of a decimal number.

Converting Between Decimals and Strings

NSDecimalString

Returns a string representation of the decimal value appropriate for the specified locale.

Performing Arithmetic Using References

NSDecimalCompact

Compacts the decimal structure for efficiency.

NSDecimalAdd

Adds two decimal values.

NSDecimalSubtract

Subtracts one decimal value from another.

NSDecimalDivide

Divides one decimal value by another.

NSDecimalMultiply

Multiplies two decimal numbers together.

NSDecimalMultiplyByPowerOf10

Multiplies a decimal by the specified power of 10.

NSDecimalRound

Rounds off the decimal value.

NSDecimalPower

Raises the decimal value to the specified power.

NSDecimalNormalize

Normalizes the internal format of two decimal numbers to simplify later operations.

NSRoundingMode

These constants specify rounding behaviors.

NSCalculationError

Calculation error constants used to describe an error in exceptionDuringOperation:error:leftOperand:rightOperand:.

Comparing Decimals

NSDecimalCompare

Compares two decimal values.

Using Reference Types

NSDecimalNumber

An object for representing and performing arithmetic on base-10 numbers.

See Also

Numbers

NSInteger

Describes an integer.

NSUInteger

Describes an unsigned integer.

NSDecimalNumber

An object for representing and performing arithmetic on base-10 numbers.

NSNumber

An object wrapper for primitive scalar numeric values.

NSNumberFormatter

A formatter that converts between numeric values and their textual representations.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software