1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
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 |
|
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
|