+ decimalNumberWithDecimal:
+ decimalNumberWithMantissa:exponent:isNegative:
+ decimalNumberWithString:
+ decimalNumberWithString:locale:
one
zero
notANumber
Availability 有効性
Technology
@interface NSDecimalNumber : NSNumber
NSDecimal
, an immutable subclass of NSNumber
, provides an object-oriented wrapper for doing base-10 arithmetic. An instance can represent any number that can be expressed as mantissa x 10^exponent
where mantissa is a decimal integer up to 38 digits long, and exponent is an integer from –128 through 127.
NSDecimal
、NSNumber
の不変のサブクラスは、オブジェクト指向ラッパーを10進数計算を行うのために提供します。インスタンスは仮数 x 10^指数
として表現できるどんな数でも表せます、そこで仮数は38桁長までの10進整数です、そして指数は–128から127までの整数です。
Important 重要
The Swift overlay to the Foundation framework provides the NSDecimal
structure, which bridges to the NSDecimal
class. For more information about value types, see Working with Cocoa Frameworks in Using Swift with Cocoa and Objective-C (Swift 4.1).
FoundationフレームワークへのSwiftオーバーレイは、NSDecimal
構造体を提供します、それはNSDecimal
クラスにブリッジします。値型についてのさらなる情報として、Working with Cocoa FrameworksをUsing Swift with Cocoa and Objective-C (Swift 4.1)で見てください。
+ decimalNumberWithDecimal:
+ decimalNumberWithMantissa:exponent:isNegative:
+ decimalNumberWithString:
+ decimalNumberWithString:locale:
one
zero
notANumber
- initWithDecimal:
- initWithMantissa:exponent:isNegative:
- initWithString:
- initWithString:locale:
- decimalNumberByAdding:
- decimalNumberBySubtracting:
- decimalNumberByMultiplyingBy:
- decimalNumberByDividingBy:
- decimalNumberByRaisingToPower:
- decimalNumberByMultiplyingByPowerOf10:
- decimalNumberByAdding:withBehavior:
- decimalNumberBySubtracting:withBehavior:
- decimalNumberByMultiplyingBy:withBehavior:
- decimalNumberByDividingBy:withBehavior:
- decimalNumberByRaisingToPower:withBehavior:
- decimalNumberByMultiplyingByPowerOf10:withBehavior:
- decimalNumberByRoundingAccordingToBehavior:
defaultBehavior
NSDecimalNumberBehaviors
NSDecimalNumberHandler
doubleValue
double
value.
その10進数の最も近いおおよそのdouble
値。
- descriptionWithLocale:
objCType
- compare:
maximumDecimalNumber
minimumDecimalNumber
NSDecimalNumberExactnessException
NSDecimalNumberOverflowException
NSDecimalNumberUnderflowException
NSDecimalNumberDivideByZeroException
NSInteger
NSUInteger
NSDecimal
NSNumber
NSNumberFormatter