UNPKG

938 Btext/x-cView Raw
1//
2// JKBigDecimal.h
3// JKBigInteger
4//
5// Created by Midfar Sun on 5/4/15.
6// Copyright (c) 2015 Midfar Sun. All rights reserved.
7//
8
9// Licensed under the MIT License
10
11#import <Foundation/Foundation.h>
12#import "JKBigInteger.h"
13
14@interface JKBigDecimal : NSObject <NSSecureCoding>
15
16@property(nonatomic, retain)JKBigInteger *bigInteger;
17@property(nonatomic, assign)NSUInteger figure;//小数位数
18
19+ (id)decimalWithString:(NSString *)string;
20- (id)initWithString:(NSString *)string;
21
22- (id)add:(JKBigDecimal *)bigDecimal;
23- (id)subtract:(JKBigDecimal *)bigDecimal;
24- (id)multiply:(JKBigDecimal *)bigDecimal;
25- (id)divide:(JKBigDecimal *)bigDecimal;
26
27- (id)remainder:(JKBigDecimal *)bigInteger;
28//- (NSArray *)divideAndRemainder:(JKBigDecimal *)bigInteger;
29
30- (NSComparisonResult) compare:(JKBigDecimal *)other;
31- (id)pow:(unsigned int)exponent;
32
33- (id)negate;
34- (id)abs;
35
36- (NSString *)stringValue;
37
38- (NSString *)description;
39
40@end