AALanguage
The best language for those who have nothing to do
|
A class for AALanguage variables of type large that implement long arithmetic. More...
#include <Large.h>
Public Member Functions | |
large () | |
Default constructor, absolute number value is set to 0. | |
large (std::string str) | |
Constructor from a string representation of a number. | |
large (long long value) | |
Constructor from a long long equivalent of a number. | |
large & | operator+= (const large &value) |
large & | operator-= (const large &value) |
large & | operator*= (const large &value) |
large & | operator/= (const large &value) |
large & | operator%= (const large &value) |
large | operator++ (::int32_t d) |
large | operator-- (::int32_t d) |
large & | operator++ () |
large & | operator-- () |
large | operator- () |
bool | operator== (large val) |
bool | operator!= (large val) |
bool | operator<= (large val) |
bool | operator>= (large val) |
bool | operator> (large val) |
bool | operator< (large val) |
large | operator+ (large val) |
A plus operation that uses columnar addition. | |
large | operator- (large val) |
A minus operation that uses subtraction in a column. | |
large | operator* (large val) |
A multiplication operation that uses column multiplication. | |
large | operator/ (long long val) |
An operation of division by long long long using a columnar calculation. | |
large | operator/ (large val) |
An operation of integer division by a large number. Uses the binary search algorithm and multiplication to check for equality. O(logN) asymptotics. | |
large | operator% (large val) |
std::string | ToString () |
Converting a large number into a string. | |
Private Types | |
enum | Sign { Plus , Minus } |
Private Member Functions | |
std::string | GetNum () |
large | pow (large val) |
Private Attributes | |
std::string | num |
Sign | sign |
A class for AALanguage variables of type large that implement long arithmetic.
|
private |
large::large | ( | ) |
Default constructor, absolute number value is set to 0.
Definition at line 3 of file Large.cpp.
References num, Plus, and sign.
Referenced by operator%(), operator*(), operator+(), operator++(), operator++(), operator-(), operator-(), operator--(), operator--(), operator/(), and operator/().
large::large | ( | std::string | str | ) |
large::large | ( | long long | value | ) |
|
private |
Definition at line 25 of file Large.cpp.
References num.
Referenced by operator%(), operator*(), operator+(), operator-(), operator/(), operator<(), and operator==().
large large::operator/ | ( | long long | val | ) |
bool large::operator< | ( | large | val | ) |
bool large::operator== | ( | large | val | ) |
std::string large::ToString | ( | ) |
|
private |
Definition at line 61 of file Large.h.
Referenced by GetNum(), large(), large(), large(), operator%(), operator*(), operator+(), operator-(), operator/(), operator/(), operator<(), operator==(), pow(), and ToString().
|
private |
Definition at line 62 of file Large.h.
Referenced by large(), large(), large(), operator%(), operator*(), operator+(), operator-(), operator/(), operator/(), operator<(), and ToString().