-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoperation.h
executable file
·28 lines (18 loc) · 1.19 KB
/
operation.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifndef __OPERATION_H__
#define __OPERATION_H__
int mulBy10(const struct NUMBER*, struct NUMBER*);
int divBy10 (const struct NUMBER*, struct NUMBER*);
int add (const struct NUMBER*, const struct NUMBER*, struct NUMBER*);
int directAdd(struct NUMBER* addedNum, const struct NUMBER* addNum);
int increment (const struct NUMBER*, struct NUMBER*);
int sub (const struct NUMBER*, const struct NUMBER*, struct NUMBER*);
int directSub (struct NUMBER* minuend, const struct NUMBER* subtrahend);
int decrement (const struct NUMBER*, struct NUMBER*);
int oneDigitMultiple (const struct NUMBER* a, int oneDigitNum, struct NUMBER* result);
int multiple (const struct NUMBER*, const struct NUMBER*, struct NUMBER*);
int directMultiple (struct NUMBER* multiplicand, const struct NUMBER* multiplier);
int shiftLeft (const struct NUMBER* a, struct NUMBER* b, int nBit);
int directShiftLeft(struct NUMBER* number, int nBit);
int divide (const struct NUMBER* divend, const struct NUMBER* divisor, struct NUMBER* quotient, struct NUMBER* remainder);
int fast_divide (const struct NUMBER* divend, const struct NUMBER* divisor, struct NUMBER* quotient, struct NUMBER* remainder);
#endif //__OPERATION_H__