BCD
|
#include <iostream>
#include <ctime>
Classes | |
class | BCD |
Macros | |
#define | WATCH(x) |
#define | BLKSIZE 100 |
Typedefs | |
typedef int | T |
Functions | |
int | max (int l, int r) |
returns the maximum of two values More... | |
int | min (int l, int r) |
returns the minimumof two values More... | |
BCD | operator+ (const BCD &l, const BCD &r) |
int | compareWShift (const BCD &l, const BCD &r, int shift=0) |
bool | operator> (const BCD &l, const BCD &r) |
bool | operator< (const BCD &l, const BCD &r) |
bool | operator== (const BCD &l, const BCD &r) |
bool | operator>= (const BCD &l, const BCD &r) |
bool | operator<= (const BCD &l, const BCD &r) |
BCD | subWShift (BCD &l, const BCD &r, int shift=0) |
BCD | operator- (const BCD &l, const BCD &r) |
BCD | operator* (const BCD &l, const BCD &r) |
BCD | operator/ (const BCD &n, const BCD &d) |
BCD | BCDFactorial (int f) |
unsigned long | factorial (unsigned long n) |
int | main () |
Variables | |
T | remainders [100] |
T | modulas [100] |
#define BLKSIZE 100 |
#define WATCH | ( | x | ) |
typedef int T |
T defines the storage type of a BCD digit. This can be any of the integer types; (int, unsigned int, char, unsigned char, UINT8, etc.) the only two that make much sense are int and char
BCD BCDFactorial | ( | int | f | ) |
unsigned long factorial | ( | unsigned long | n | ) |
int main | ( | ) |
int max | ( | int | l, |
int | r | ||
) |
returns the maximum of two values
l | int |
r | int |
int min | ( | int | l, |
int | r | ||
) |
returns the minimumof two values
l | int |
r | int |
T modulas[100] |
T remainders[100] |