-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbignum.h
More file actions
executable file
·26 lines (21 loc) · 785 Bytes
/
bignum.h
File metadata and controls
executable file
·26 lines (21 loc) · 785 Bytes
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
#ifndef __BIGNUM_H__
#define __BIGNUM_H__
#define KETA 1050
struct NUMBER
{
int n [KETA];
int sign;
};
/*********************************/
void clearByZero(struct NUMBER*);
void setRnd (struct NUMBER*, int);
int setInt (struct NUMBER*, int);
void copyNumber(const struct NUMBER*, struct NUMBER*);
void getAbs(const struct NUMBER*, struct NUMBER*);
int isZero (const struct NUMBER*); // if a is zero, return 0;
void swap (struct NUMBER*, struct NUMBER*);
int numComp (const struct NUMBER*, const struct NUMBER*);
int isEven (const struct NUMBER* number);
int getTopDigitIndex(const struct NUMBER* number);
void copyPartition (const struct NUMBER* original, int firstIndex, int lastIndex, struct NUMBER* copied); // first > last
#endif // __BIGNUM_H__