![]() |
TTMath
0.9.4
C++ bignum library
|
UInt implements a big integer value without a sign. More...
#include <ttmathuint.h>
Data Structures | |
union | uint_ |
Public Member Functions | |
template<class ostream_type > | |
void | PrintTable (ostream_type &output) const |
template<class char_type , class ostream_type > | |
void | PrintLog (const char_type *msg, ostream_type &output) const |
template<class char_type , class ostream_type > | |
void | PrintLog (const char_type *msg, uint carry, ostream_type &output) const |
uint | Size () const |
void | SetZero () |
void | SetOne () |
void | SetMax () |
void | SetMin () |
void | Swap (UInt< value_size > &ss2) |
void | SetFromTable (const unsigned int *temp_table, uint temp_table_len) |
uint | AddOne () |
uint | SubOne () |
uint | Rcl (uint bits, uint c=0) |
uint | Rcr (uint bits, uint c=0) |
uint | CompensationToLeft () |
bool | FindLeadingBit (uint &table_id, uint &index) const |
bool | FindLowestBit (uint &table_id, uint &index) const |
uint | GetBit (uint bit_index) const |
uint | SetBit (uint bit_index) |
void | BitAnd (const UInt< value_size > &ss2) |
void | BitOr (const UInt< value_size > &ss2) |
void | BitXor (const UInt< value_size > &ss2) |
void | BitNot () |
void | BitNot2 () |
uint | MulInt (uint ss2) |
template<uint result_size> | |
void | MulInt (uint ss2, UInt< result_size > &result) const |
uint | Mul (const UInt< value_size > &ss2, uint algorithm=100) |
void | MulBig (const UInt< value_size > &ss2, UInt< value_size *2 > &result, uint algorithm=100) |
uint | Mul1 (const UInt< value_size > &ss2) |
void | Mul1Big (const UInt< value_size > &ss2_, UInt< value_size *2 > &result) |
uint | Mul2 (const UInt< value_size > &ss2) |
void | Mul2Big (const UInt< value_size > &ss2, UInt< value_size *2 > &result) |
uint | Mul3 (const UInt< value_size > &ss2) |
void | Mul3Big (const UInt< value_size > &ss2, UInt< value_size *2 > &result) |
uint | MulFastest (const UInt< value_size > &ss2) |
void | MulFastestBig (const UInt< value_size > &ss2, UInt< value_size *2 > &result) |
uint | DivInt (uint divisor, uint *remainder=0) |
uint | DivInt (uint divisor, uint &remainder) |
uint | Div (const UInt< value_size > &divisor, UInt< value_size > *remainder=0, uint algorithm=3) |
uint | Div (const UInt< value_size > &divisor, UInt< value_size > &remainder, uint algorithm=3) |
uint | Div1 (const UInt< value_size > &divisor, UInt< value_size > *remainder=0) |
uint | Div1 (const UInt< value_size > &divisor, UInt< value_size > &remainder) |
uint | Div2 (const UInt< value_size > &divisor, UInt< value_size > *remainder=0) |
uint | Div2 (const UInt< value_size > &divisor, UInt< value_size > &remainder) |
uint | Div3 (const UInt< value_size > &ss2, UInt< value_size > *remainder=0) |
uint | Div3 (const UInt< value_size > &ss2, UInt< value_size > &remainder) |
uint | Pow (UInt< value_size > pow) |
void | Sqrt () |
void | ClearFirstBits (uint n) |
bool | IsTheHighestBitSet () const |
bool | IsTheLowestBitSet () const |
bool | IsOnlyTheHighestBitSet () const |
bool | IsOnlyTheLowestBitSet () const |
bool | IsZero () const |
bool | AreFirstBitsZero (uint bits) const |
template<uint argument_size> | |
uint | FromUInt (const UInt< argument_size > &p) |
template<uint argument_size> | |
uint | FromInt (const UInt< argument_size > &p) |
uint | FromUInt (uint value) |
uint | FromInt (uint value) |
uint | FromInt (sint value) |
template<uint argument_size> | |
UInt< value_size > & | operator= (const UInt< argument_size > &p) |
UInt< value_size > & | operator= (const UInt< value_size > &p) |
UInt< value_size > & | operator= (uint i) |
UInt (uint i) | |
UInt< value_size > & | operator= (sint i) |
UInt (sint i) | |
uint | FromUInt (unsigned int i) |
uint | FromInt (unsigned int i) |
uint | FromInt (signed int i) |
UInt< value_size > & | operator= (unsigned int i) |
UInt (unsigned int i) | |
UInt< value_size > & | operator= (signed int i) |
UInt (signed int i) | |
UInt (const char *s) | |
UInt (const std::string &s) | |
UInt (const wchar_t *s) | |
UInt (const std::wstring &s) | |
UInt () | |
UInt (const UInt< value_size > &u) | |
template<uint argument_size> | |
UInt (const UInt< argument_size > &u) | |
~UInt () | |
uint | ToUInt () const |
uint | ToUInt (uint &result) const |
uint | ToInt (uint &result) const |
uint | ToInt (sint &result) const |
uint | ToUInt (unsigned int &result) const |
uint | ToInt (unsigned int &result) const |
uint | ToInt (int &result) const |
template<class string_type > | |
void | ToStringBase (string_type &result, uint b=10, bool negative=false) const |
void | ToString (std::string &result, uint b=10) const |
std::string | ToString (uint b=10) const |
void | ToString (std::wstring &result, uint b=10) const |
std::wstring | ToWString (uint b=10) const |
uint | FromString (const char *s, uint b=10, const char **after_source=0, bool *value_read=0) |
uint | FromString (const std::string &s, uint b=10) |
UInt< value_size > & | operator= (const char *s) |
UInt< value_size > & | operator= (const std::string &s) |
uint | FromString (const wchar_t *s, uint b=10, const wchar_t **after_source=0, bool *value_read=0) |
uint | FromString (const std::wstring &s, uint b=10) |
UInt< value_size > & | operator= (const wchar_t *s) |
UInt< value_size > & | operator= (const std::wstring &s) |
bool | CmpSmaller (const UInt< value_size > &l, sint index=-1) const |
bool | CmpBigger (const UInt< value_size > &l, sint index=-1) const |
bool | CmpEqual (const UInt< value_size > &l, sint index=-1) const |
bool | CmpSmallerEqual (const UInt< value_size > &l, sint index=-1) const |
bool | CmpBiggerEqual (const UInt< value_size > &l, sint index=-1) const |
bool | operator< (const UInt< value_size > &l) const |
bool | operator> (const UInt< value_size > &l) const |
bool | operator== (const UInt< value_size > &l) const |
bool | operator!= (const UInt< value_size > &l) const |
bool | operator<= (const UInt< value_size > &l) const |
bool | operator>= (const UInt< value_size > &l) const |
UInt< value_size > | operator- (const UInt< value_size > &p2) const |
UInt< value_size > & | operator-= (const UInt< value_size > &p2) |
UInt< value_size > | operator+ (const UInt< value_size > &p2) const |
UInt< value_size > & | operator+= (const UInt< value_size > &p2) |
UInt< value_size > | operator* (const UInt< value_size > &p2) const |
UInt< value_size > & | operator*= (const UInt< value_size > &p2) |
UInt< value_size > | operator/ (const UInt< value_size > &p2) const |
UInt< value_size > & | operator/= (const UInt< value_size > &p2) |
UInt< value_size > | operator% (const UInt< value_size > &p2) const |
UInt< value_size > & | operator%= (const UInt< value_size > &p2) |
UInt< value_size > & | operator++ () |
UInt< value_size > | operator++ (int) |
UInt< value_size > & | operator-- () |
UInt< value_size > | operator-- (int) |
UInt< value_size > | operator~ () const |
UInt< value_size > | operator & (const UInt< value_size > &p2) const |
UInt< value_size > & | operator &= (const UInt< value_size > &p2) |
UInt< value_size > | operator| (const UInt< value_size > &p2) const |
UInt< value_size > & | operator|= (const UInt< value_size > &p2) |
UInt< value_size > | operator^ (const UInt< value_size > &p2) const |
UInt< value_size > & | operator^= (const UInt< value_size > &p2) |
UInt< value_size > | operator>> (int move) const |
UInt< value_size > & | operator>>= (int move) |
UInt< value_size > | operator<< (int move) const |
UInt< value_size > & | operator<<= (int move) |
uint | Add (const UInt< value_size > &ss2, uint c=0) |
uint | AddInt (uint value, uint index=0) |
uint | AddTwoInts (uint x2, uint x1, uint index) |
uint | Sub (const UInt< value_size > &ss2, uint c=0) |
uint | SubInt (uint value, uint index=0) |
Static Public Member Functions | |
template<class char_type , class ostream_type > | |
static void | PrintVectorLog (const char_type *msg, ostream_type &output, const uint *vector, uint vector_len) |
template<class char_type , class ostream_type > | |
static void | PrintVectorLog (const char_type *msg, uint carry, ostream_type &output, const uint *vector, uint vector_len) |
static uint | AddTwoWords (uint a, uint b, uint carry, uint *result) |
static uint | SubTwoWords (uint a, uint b, uint carry, uint *result) |
static void | DivTwoWords2 (uint a, uint b, uint c, uint *r, uint *rest) |
static uint | DivTwoWordsNormalize (uint_ &a_, uint_ &b_, uint_ &c_) |
static uint | DivTwoWordsUnnormalize (uint u, uint d) |
static unsigned int | DivTwoWordsCalculate (uint_ u_, unsigned int u3, uint_ v_) |
static void | MultiplySubtract (uint_ &u_, unsigned int &u3, unsigned int &q, uint_ v_) |
static const char * | LibTypeStr () |
static LibTypeCode | LibType () |
static uint | AddVector (const uint *ss1, const uint *ss2, uint ss1_size, uint ss2_size, uint *result) |
static uint | SubVector (const uint *ss1, const uint *ss2, uint ss1_size, uint ss2_size, uint *result) |
static sint | FindLeadingBitInWord (uint x) |
static sint | FindLowestBitInWord (uint x) |
static uint | SetBitInWord (uint &value, uint bit) |
static void | MulTwoWords (uint a, uint b, uint *result_high, uint *result_low) |
static void | DivTwoWords (uint a, uint b, uint c, uint *r, uint *rest) |
Data Fields | |
uint | table [value_size] |
Protected Member Functions | |
double | ToStringLog2 (uint x) const |
Friends | |
std::ostream & | operator<< (std::ostream &s, const UInt< value_size > &l) |
std::wostream & | operator<< (std::wostream &s, const UInt< value_size > &l) |
std::istream & | operator>> (std::istream &s, UInt< value_size > &l) |
std::wistream & | operator>> (std::wistream &s, UInt< value_size > &l) |
UInt implements a big integer value without a sign.
value_size - how many bytes specify our value
Definition at line 73 of file ttmathuint.h.
ttmath::UInt< value_size >::UInt | ( | uint | i | ) |
ttmath::UInt< value_size >::UInt | ( | sint | i | ) |
a constructor for converting the sint to this class
look at the description of UInt::operator=(sint)
Definition at line 2808 of file ttmathuint.h.
ttmath::UInt< value_size >::UInt | ( | unsigned int | i | ) |
a constructor for converting 32 bit unsigned int to this class this constructor is created only on a 64bit platform***
Definition at line 2964 of file ttmathuint.h.
ttmath::UInt< value_size >::UInt | ( | signed int | i | ) |
a constructor for converting 32 bit signed int to this class this constructor is created only on a 64bit platform***
Definition at line 2986 of file ttmathuint.h.
ttmath::UInt< value_size >::UInt | ( | const char * | s | ) |
a constructor for converting a string to this class (with the base=10)
Definition at line 3001 of file ttmathuint.h.
ttmath::UInt< value_size >::UInt | ( | const std::string & | s | ) |
a constructor for converting a string to this class (with the base=10)
Definition at line 3010 of file ttmathuint.h.
ttmath::UInt< value_size >::UInt | ( | const wchar_t * | s | ) |
a constructor for converting a string to this class (with the base=10)
Definition at line 3021 of file ttmathuint.h.
ttmath::UInt< value_size >::UInt | ( | const std::wstring & | s | ) |
a constructor for converting a string to this class (with the base=10)
Definition at line 3030 of file ttmathuint.h.
ttmath::UInt< value_size >::UInt | ( | ) |
ttmath::UInt< value_size >::UInt | ( | const UInt< value_size > & | u | ) |
ttmath::UInt< value_size >::UInt | ( | const UInt< argument_size > & | u | ) |
a template for producting constructors for copying from another types
Definition at line 3080 of file ttmathuint.h.
ttmath::UInt< value_size >::~UInt | ( | ) |
uint ttmath::UInt< value_size >::Add | ( | const UInt< value_size > & | ss2, |
uint | c = 0 |
||
) |
basic mathematic functions
this method adding ss2 to the this and adding carry if it's defined (this = this + ss2 + c)
this method is created only on a 64bit platform***
c must be zero or one (might be a bigger value than 1) function returns carry (1) (if it was)
Definition at line 158 of file ttmathuint_x86_64.h.
Referenced by ttmath::Int< exp >::Add(), ttmath::UInt< man >::Div1(), ttmath::UInt< man >::MulBig(), ttmath::UInt< man >::operator-(), ttmath::UInt< man >::Sqrt(), and ttmath::UInt< man >::ToString().
uint ttmath::UInt< value_size >::AddInt | ( | uint | value, |
uint | index = 0 |
||
) |
this method adds one word (at a specific position) and returns a carry (if it was)
this method is created only on a 64bit platform***
if we've got (value_size=3):
table[0] = 10; table[1] = 30; table[2] = 5;
and we call:
AddInt(2,1)
then it'll be:
table[0] = 10; table[1] = 30 + 2; table[2] = 5;
of course if there was a carry from table[2] it would be returned
Definition at line 231 of file ttmathuint_x86_64.h.
Referenced by ttmath::Int< exp >::AddInt(), and ttmath::UInt< man >::AddOne().
uint ttmath::UInt< value_size >::AddOne | ( | ) |
basic mathematic functions
this method adds one to the existing value
Definition at line 386 of file ttmathuint.h.
Referenced by ttmath::Int< exp >::AddOne(), ttmath::Big< exp, man >::ChangeSign(), and ttmath::UInt< man >::operator++().
uint ttmath::UInt< value_size >::AddTwoInts | ( | uint | x2, |
uint | x1, | ||
uint | index | ||
) |
this method adds only two unsigned words to the existing value and these words begin on the 'index' position (it's used in the multiplication algorithm 2)
this method is created only on a 64bit platform***
index should be equal or smaller than value_size-2 (index <= value_size-2) x1 - lower word, x2 - higher word
for example if we've got value_size equal 4 and:
table[0] = 3 table[1] = 4 table[2] = 5 table[3] = 6
then let
x1 = 10 x2 = 20
and
index = 1
the result of this method will be:
table[0] = 3 table[1] = 4 + x1 = 14 table[2] = 5 + x2 = 25 table[3] = 6
and no carry at the end of table[3]
(of course if there was a carry in table[2](5+20) then this carry would be passed to the table[3] etc.)
Definition at line 316 of file ttmathuint_x86_64.h.
Referenced by ttmath::Int< exp >::AddTwoInts().
|
static |
this static method addes one vector to the other 'ss1' is larger in size or equal to 'ss2'
result - is the result vector (which has size the same as ss1: ss1_size)
Example: ss1_size is 5, ss2_size is 3 ss1: ss2: result (output): 5 1 5+1 4 3 4+3 2 7 2+7 6 6 9 9 of course the carry is propagated and will be returned from the last item (this method is used by the Karatsuba multiplication algorithm)
Definition at line 387 of file ttmathuint_x86_64.h.
bool ttmath::UInt< value_size >::AreFirstBitsZero | ( | uint | bits | ) | const |
void ttmath::UInt< value_size >::BitAnd | ( | const UInt< value_size > & | ss2 | ) |
this method performs a bitwise operation AND
Definition at line 743 of file ttmathuint.h.
Referenced by ttmath::Big< exp, man >::BitAnd(), and ttmath::UInt< man >::operator~().
void ttmath::UInt< value_size >::BitNot | ( | ) |
this method performs a bitwise operation NOT
Definition at line 779 of file ttmathuint.h.
Referenced by ttmath::UInt< man >::operator~().
void ttmath::UInt< value_size >::BitNot2 | ( | ) |
this method performs a bitwise operation NOT but only on the range of <0, leading_bit>
for example: BitNot2(8) = BitNot2( 1000(bin) ) = 111(bin) = 7
Definition at line 795 of file ttmathuint.h.
void ttmath::UInt< value_size >::BitOr | ( | const UInt< value_size > & | ss2 | ) |
this method performs a bitwise operation OR
Definition at line 755 of file ttmathuint.h.
Referenced by ttmath::Big< exp, man >::BitOr(), and ttmath::UInt< man >::operator~().
void ttmath::UInt< value_size >::BitXor | ( | const UInt< value_size > & | ss2 | ) |
this method performs a bitwise operation XOR
Definition at line 767 of file ttmathuint.h.
Referenced by ttmath::Big< exp, man >::BitXor(), and ttmath::UInt< man >::operator~().
void ttmath::UInt< value_size >::ClearFirstBits | ( | uint | n | ) |
this method sets n first bits to value zero
For example: let n=2 then if there's a value 111 (bin) there'll be '100' (bin)
Definition at line 2508 of file ttmathuint.h.
Referenced by ttmath::Big< exp, man >::SkipFraction().
bool ttmath::UInt< value_size >::CmpBigger | ( | const UInt< value_size > & | l, |
sint | index = -1 |
||
) | const |
this method returns true if 'this' is bigger than 'l'
'index' is an index of the first word from will be the comparison performed (note: we start the comparison from back - from the last word, when index is -1 /default/ it is automatically set into the last word)
I introduced it for some kind of optimization made in the second division algorithm (Div2)
Definition at line 3606 of file ttmathuint.h.
Referenced by ttmath::UInt< man >::CmpBiggerEqual().
bool ttmath::UInt< value_size >::CmpBiggerEqual | ( | const UInt< value_size > & | l, |
sint | index = -1 |
||
) | const |
this method returns true if 'this' is bigger than or equal 'l'
'index' is an index of the first word from will be the comparison performed (note: we start the comparison from back - from the last word, when index is -1 /default/ it is automatically set into the last word)
Definition at line 3689 of file ttmathuint.h.
Referenced by ttmath::UInt< man >::CmpBiggerEqual(), and ttmath::UInt< man >::Div2().
bool ttmath::UInt< value_size >::CmpEqual | ( | const UInt< value_size > & | l, |
sint | index = -1 |
||
) | const |
this method returns true if 'this' is equal 'l'
'index' is an index of the first word from will be the comparison performed (note: we start the comparison from back - from the last word, when index is -1 /default/ it is automatically set into the last word)
Definition at line 3634 of file ttmathuint.h.
Referenced by ttmath::UInt< man >::CmpBiggerEqual().
bool ttmath::UInt< value_size >::CmpSmaller | ( | const UInt< value_size > & | l, |
sint | index = -1 |
||
) | const |
methods for comparing
this method returns true if 'this' is smaller than 'l'
'index' is an index of the first word from will be the comparison performed (note: we start the comparison from back - from the last word, when index is -1 /default/ it is automatically set into the last word) I introduced it for some kind of optimization made in the second division algorithm (Div2)
Definition at line 3575 of file ttmathuint.h.
Referenced by ttmath::UInt< man >::CmpBiggerEqual().
bool ttmath::UInt< value_size >::CmpSmallerEqual | ( | const UInt< value_size > & | l, |
sint | index = -1 |
||
) | const |
this method returns true if 'this' is smaller than or equal 'l'
'index' is an index of the first word from will be the comparison performed (note: we start the comparison from back - from the last word, when index is -1 /default/ it is automatically set into the last word)
Definition at line 3660 of file ttmathuint.h.
Referenced by ttmath::UInt< man >::CmpBiggerEqual().
uint ttmath::UInt< value_size >::CompensationToLeft | ( | ) |
this method moves all bits into the left side (it returns value how many bits have been moved)
Definition at line 598 of file ttmathuint.h.
Referenced by ttmath::Big< exp, man >::FromInt(), ttmath::Big< exp, man >::FromUInt(), ttmath::Big< exp, man >::Mul(), ttmath::Big< exp, man >::MulUInt(), and ttmath::Big< exp, man >::Standardizing().
uint ttmath::UInt< value_size >::Div | ( | const UInt< value_size > & | divisor, |
UInt< value_size > * | remainder = 0 , |
||
uint | algorithm = 3 |
||
) |
division this = this / ss2
return values:
Definition at line 1626 of file ttmathuint.h.
Referenced by ttmath::Int< exp >::Div(), ttmath::UInt< man >::Div(), ttmath::Big< exp, man >::Mul(), and ttmath::UInt< man >::operator-().
uint ttmath::UInt< value_size >::Div1 | ( | const UInt< value_size > & | divisor, |
UInt< value_size > * | remainder = 0 |
||
) |
the first division algorithm (radix 2)
Definition at line 1752 of file ttmathuint.h.
Referenced by ttmath::UInt< man >::Div(), and ttmath::UInt< man >::Div1().
uint ttmath::UInt< value_size >::Div1 | ( | const UInt< value_size > & | divisor, |
UInt< value_size > & | remainder | ||
) |
the first division algorithm (radix 2)
Definition at line 1775 of file ttmathuint.h.
uint ttmath::UInt< value_size >::Div2 | ( | const UInt< value_size > & | divisor, |
UInt< value_size > * | remainder = 0 |
||
) |
the second division algorithm
return values:
Definition at line 1862 of file ttmathuint.h.
Referenced by ttmath::UInt< man >::Div(), and ttmath::UInt< man >::Div2().
uint ttmath::UInt< value_size >::Div2 | ( | const UInt< value_size > & | divisor, |
UInt< value_size > & | remainder | ||
) |
the second division algorithm
return values:
Definition at line 1883 of file ttmathuint.h.
uint ttmath::UInt< value_size >::Div3 | ( | const UInt< value_size > & | ss2, |
UInt< value_size > * | remainder = 0 |
||
) |
the third division algorithm
Definition at line 2108 of file ttmathuint.h.
Referenced by ttmath::UInt< man >::Div(), and ttmath::UInt< man >::Div3().
uint ttmath::UInt< value_size >::Div3 | ( | const UInt< value_size > & | ss2, |
UInt< value_size > & | remainder | ||
) |
the third division algorithm
Definition at line 2125 of file ttmathuint.h.
uint ttmath::UInt< value_size >::DivInt | ( | uint | divisor, |
uint * | remainder = 0 |
||
) |
Division
division by one unsigned word
returns 1 when divisor is zero
Definition at line 1568 of file ttmathuint.h.
Referenced by ttmath::UInt< man >::Div3(), ttmath::Int< exp >::DivInt(), and ttmath::UInt< man >::ToStringBase().
|
static |
Division
this method calculates 64bits word a:b / 32bits c (a higher, b lower word) r = a:b / c and rest - remainder
this method is created only on a 64bit platform***
WARNING: if r (one word) is too small for the result or c is equal zero there'll be a hardware interruption (0) and probably the end of your program
Definition at line 1132 of file ttmathuint_x86_64.h.
bool ttmath::UInt< value_size >::FindLeadingBit | ( | uint & | table_id, |
uint & | index | ||
) | const |
this method looks for the highest set bit
result:
Definition at line 649 of file ttmathuint.h.
Referenced by ttmath::UInt< man >::BitNot2(), and ttmath::UInt< man >::ToStringBase().
bool ttmath::UInt< value_size >::FindLowestBit | ( | uint & | table_id, |
uint & | index | ||
) | const |
this method looks for the smallest set bit
result:
Definition at line 681 of file ttmathuint.h.
uint ttmath::UInt< value_size >::FromInt | ( | const UInt< argument_size > & | p | ) |
this method converts an UInt<another_size> type to this class
this operation has mainly sense if the value from p is equal or smaller than that one which is returned from UInt<value_size>::SetMax()
it returns a carry if the value 'p' is too big
Definition at line 2698 of file ttmathuint.h.
Referenced by ttmath::UInt< man >::FromInt(), ttmath::UInt< man >::operator=(), and ttmath::UInt< man >::UInt().
uint ttmath::UInt< value_size >::FromInt | ( | uint | value | ) |
uint ttmath::UInt< value_size >::FromInt | ( | sint | value | ) |
uint ttmath::UInt< value_size >::FromInt | ( | unsigned int | i | ) |
this method converts 32 bit unsigned int type to this class this operator is created only on a 64bit platform***
Definition at line 2932 of file ttmathuint.h.
uint ttmath::UInt< value_size >::FromInt | ( | signed int | i | ) |
this method converts 32 bit signed int type to this class this operator is created only on a 64bit platform***
Definition at line 2942 of file ttmathuint.h.
uint ttmath::UInt< value_size >::FromString | ( | const char * | s, |
uint | b = 10 , |
||
const char ** | after_source = 0 , |
||
bool * | value_read = 0 |
||
) |
this method converts a string into its value it returns carry=1 if the value will be too big or an incorrect base 'b' is given
string is ended with a non-digit value, for example: "12" will be translated to 12 as well as: "12foo" will be translated to 12 too
existing first white characters will be ommited
if the value from s is too large the rest digits will be skipped
after_source (if exists) is pointing at the end of the parsed string
value_read (if exists) tells whether something has actually been read (at least one digit)
Definition at line 3474 of file ttmathuint.h.
Referenced by ttmath::UInt< man >::FromString(), ttmath::UInt< man >::operator=(), and ttmath::UInt< man >::UInt().
uint ttmath::UInt< value_size >::FromString | ( | const std::string & | s, |
uint | b = 10 |
||
) |
this method converts a string into its value
(it returns carry=1 if the value will be too big or an incorrect base 'b' is given)
Definition at line 3485 of file ttmathuint.h.
uint ttmath::UInt< value_size >::FromString | ( | const wchar_t * | s, |
uint | b = 10 , |
||
const wchar_t ** | after_source = 0 , |
||
bool * | value_read = 0 |
||
) |
this method converts a string into its value
Definition at line 3519 of file ttmathuint.h.
uint ttmath::UInt< value_size >::FromString | ( | const std::wstring & | s, |
uint | b = 10 |
||
) |
this method converts a string into its value
(it returns carry=1 if the value will be too big or an incorrect base 'b' is given)
Definition at line 3530 of file ttmathuint.h.
uint ttmath::UInt< value_size >::FromUInt | ( | const UInt< argument_size > & | p | ) |
conversion methods
this method converts an UInt<another_size> type to this class
this operation has mainly sense if the value from p is equal or smaller than that one which is returned from UInt<value_size>::SetMax()
it returns a carry if the value 'p' is too big
Definition at line 2657 of file ttmathuint.h.
Referenced by ttmath::UInt< man >::FromInt(), ttmath::UInt< man >::FromUInt(), ttmath::Int< exp >::Int(), ttmath::UInt< man >::operator=(), and ttmath::UInt< man >::UInt().
uint ttmath::UInt< value_size >::FromUInt | ( | uint | value | ) |
uint ttmath::UInt< value_size >::FromUInt | ( | unsigned int | i | ) |
this method converts 32 bit unsigned int type to this class this operator is created only on a 64bit platform***
Definition at line 2923 of file ttmathuint.h.
uint ttmath::UInt< value_size >::GetBit | ( | uint | bit_index | ) | const |
getting the 'bit_index' bit
bit_index bigger or equal zero
Definition at line 706 of file ttmathuint.h.
Referenced by ttmath::Big< exp, man >::Mod2().
bool ttmath::UInt< value_size >::IsOnlyTheHighestBitSet | ( | ) | const |
bool ttmath::UInt< value_size >::IsOnlyTheLowestBitSet | ( | ) | const |
bool ttmath::UInt< value_size >::IsTheHighestBitSet | ( | ) | const |
this method returns true if the highest bit of the value is set
Definition at line 2547 of file ttmathuint.h.
Referenced by ttmath::Int< exp >::IsSign(), and ttmath::Big< exp, man >::Standardizing().
bool ttmath::UInt< value_size >::IsTheLowestBitSet | ( | ) | const |
this method returns true if the lowest bit of the value is set
Definition at line 2556 of file ttmathuint.h.
Referenced by ttmath::Big< exp, man >::ChangeSign().
bool ttmath::UInt< value_size >::IsZero | ( | ) | const |
this method returns true if the value is equal zero
Definition at line 2605 of file ttmathuint.h.
Referenced by ttmath::Big< exp, man >::FromString(), ttmath::Big< exp, man >::Pow(), ttmath::UInt< man >::Pow(), ttmath::UInt< man >::Sqrt(), ttmath::Big< exp, man >::Standardizing(), and ttmath::UInt< man >::ToStringBase().
|
static |
returning the currect type of the library
Definition at line 126 of file ttmathuint_x86_64.h.
Referenced by ttmath::Big< exp, man >::LibType().
|
static |
returning the string represents the currect type of the library we have following types: asm_vc_32 - with asm code designed for Microsoft Visual C++ (32 bits) asm_gcc_32 - with asm code designed for GCC (32 bits) asm_vc_64 - with asm for VC (64 bit) asm_gcc_64 - with asm for GCC (64 bit) no_asm_32 - pure C++ version (32 bit) - without any asm code no_asm_64 - pure C++ version (64 bit) - without any asm code
Definition at line 108 of file ttmathuint_x86_64.h.
Referenced by ttmath::Big< exp, man >::LibTypeStr().
uint ttmath::UInt< value_size >::Mul | ( | const UInt< value_size > & | ss2, |
uint | algorithm = 100 |
||
) |
the multiplication 'this' = 'this' * ss2
algorithm: 100 - means automatically choose the fastest algorithm
Definition at line 923 of file ttmathuint.h.
Referenced by ttmath::Int< exp >::Mul(), ttmath::UInt< man >::operator-(), ttmath::UInt< man >::Pow(), and ttmath::UInt< man >::ToString().
uint ttmath::UInt< value_size >::Mul1 | ( | const UInt< value_size > & | ss2 | ) |
multiplication: this = this * ss2 can return carry
Definition at line 1023 of file ttmathuint.h.
Referenced by ttmath::UInt< man >::Mul(), and ttmath::UInt< man >::Mul1Big().
void ttmath::UInt< value_size >::Mul1Big | ( | const UInt< value_size > & | ss2_, |
UInt< value_size *2 > & | result | ||
) |
multiplication: result = this * ss2
result is twice bigger than 'this' and 'ss2' this method never returns carry
Definition at line 1043 of file ttmathuint.h.
Referenced by ttmath::UInt< man >::MulBig().
uint ttmath::UInt< value_size >::Mul2 | ( | const UInt< value_size > & | ss2 | ) |
the second version of the multiplication algorithm
this algorithm is similar to the 'schoolbook method' which is done by hand
multiplication: this = this * ss2
it returns carry if it has been
Definition at line 1082 of file ttmathuint.h.
Referenced by ttmath::UInt< man >::Mul().
void ttmath::UInt< value_size >::Mul2Big | ( | const UInt< value_size > & | ss2, |
UInt< value_size *2 > & | result | ||
) |
multiplication: result = this * ss2
result is twice bigger than this and ss2 this method never returns carry
Definition at line 1113 of file ttmathuint.h.
Referenced by ttmath::UInt< man >::Mul2(), ttmath::UInt< man >::MulBig(), and ttmath::UInt< man >::MulFastestBig().
uint ttmath::UInt< value_size >::Mul3 | ( | const UInt< value_size > & | ss2 | ) |
multiplication: this = this * ss2
This is Karatsuba Multiplication algorithm, we're using it when value_size is greater than or equal to TTMATH_USE_KARATSUBA_MULTIPLICATION_FROM_SIZE macro (defined in ttmathuint.h). If value_size is smaller then we're using Mul2Big() instead.
Karatsuba multiplication: Assume we have:
this = x = x1*B^m + x0 ss2 = y = y1*B^m + y0
where x0 and y0 are less than B^m the product from multiplication we can show as: x*y = (x1*B^m + x0)(y1*B^m + y0) = z2*B^(2m) + z1*B^m + z0 where
z2 = x1*y1 z1 = x1*y0 + x0*y1 z0 = x0*y0
this is standard schoolbook algorithm with O(n^2), Karatsuba observed that z1 can be given in other form:
z1 = (x1 + x0)*(y1 + y0) - z2 - z0 / z1 = (x1*y1 + x1*y0 + x0*y1 + x0*y0) - x1*y1 - x0*y0 = x1*y0 + x0*y1 /
and to calculate the multiplication we need only three multiplications (with some additions and subtractions)
Our objects 'this' and 'ss2' we divide into two parts and by using recurrence we calculate the multiplication. Karatsuba multiplication has O( n^(ln(3)/ln(2)) )
Definition at line 1212 of file ttmathuint.h.
Referenced by ttmath::UInt< man >::Mul().
void ttmath::UInt< value_size >::Mul3Big | ( | const UInt< value_size > & | ss2, |
UInt< value_size *2 > & | result | ||
) |
multiplication: result = this * ss2
result is twice bigger than this and ss2, this method never returns carry, (Karatsuba multiplication)
Definition at line 1245 of file ttmathuint.h.
Referenced by ttmath::UInt< man >::Mul3(), ttmath::UInt< man >::MulBig(), and ttmath::UInt< man >::MulFastestBig().
void ttmath::UInt< value_size >::MulBig | ( | const UInt< value_size > & | ss2, |
UInt< value_size *2 > & | result, | ||
uint | algorithm = 100 |
||
) |
the multiplication 'result' = 'this' * ss2
since the 'result' is twice bigger than 'this' and 'ss2' this method never returns a carry
algorithm: 100 - means automatically choose the fastest algorithm
Definition at line 951 of file ttmathuint.h.
uint ttmath::UInt< value_size >::MulFastest | ( | const UInt< value_size > & | ss2 | ) |
multiplication this = this * ss2
Definition at line 1479 of file ttmathuint.h.
Referenced by ttmath::UInt< man >::Mul().
void ttmath::UInt< value_size >::MulFastestBig | ( | const UInt< value_size > & | ss2, |
UInt< value_size *2 > & | result | ||
) |
multiplication result = this * ss2
this method is trying to select the fastest algorithm (in the future this method can be improved)
Definition at line 1510 of file ttmathuint.h.
Referenced by ttmath::UInt< man >::MulBig(), and ttmath::UInt< man >::MulFastest().
uint ttmath::UInt< value_size >::MulInt | ( | uint | ss2 | ) |
Multiplication
multiplication: this = this * ss2
it can return a carry
Definition at line 835 of file ttmathuint.h.
Referenced by ttmath::Int< exp >::MulInt(), and ttmath::Big< exp, man >::MulUInt().
void ttmath::UInt< value_size >::MulInt | ( | uint | ss2, |
UInt< result_size > & | result | ||
) | const |
multiplication: result = this * ss2
we're using this method only when result_size is greater than value_size if so there will not be a carry
Definition at line 873 of file ttmathuint.h.
|
static |
Multiplication
multiplication: result_high:result_low = a * b
this methos never returns a carry this method is used in the second version of the multiplication algorithms
this method is created only on a 64bit platform***
Definition at line 1072 of file ttmathuint_x86_64.h.
UInt<value_size>& ttmath::UInt< value_size >::operator++ | ( | ) |
UInt<value_size> ttmath::UInt< value_size >::operator++ | ( | int | ) |
UInt<value_size> ttmath::UInt< value_size >::operator- | ( | const UInt< value_size > & | p2 | ) | const |
standard mathematical operators
Definition at line 3755 of file ttmathuint.h.
UInt<value_size>& ttmath::UInt< value_size >::operator= | ( | const UInt< argument_size > & | p | ) |
this operator converts an UInt<another_size> type to this class
it doesn't return a carry
Definition at line 2750 of file ttmathuint.h.
Referenced by ttmath::UInt< man >::operator-().
UInt<value_size>& ttmath::UInt< value_size >::operator= | ( | const UInt< value_size > & | p | ) |
UInt<value_size>& ttmath::UInt< value_size >::operator= | ( | uint | i | ) |
UInt<value_size>& ttmath::UInt< value_size >::operator= | ( | sint | i | ) |
UInt<value_size>& ttmath::UInt< value_size >::operator= | ( | unsigned int | i | ) |
this operator converts 32 bit unsigned int type to this class this operator is created only on a 64bit platform***
Definition at line 2952 of file ttmathuint.h.
UInt<value_size>& ttmath::UInt< value_size >::operator= | ( | signed int | i | ) |
an operator for converting 32 bit signed int to this class this constructor is created only on a 64bit platform***
Definition at line 2974 of file ttmathuint.h.
UInt<value_size>& ttmath::UInt< value_size >::operator= | ( | const char * | s | ) |
this operator converts a string into its value (with base = 10)
Definition at line 3494 of file ttmathuint.h.
UInt<value_size>& ttmath::UInt< value_size >::operator= | ( | const std::string & | s | ) |
this operator converts a string into its value (with base = 10)
Definition at line 3505 of file ttmathuint.h.
UInt<value_size>& ttmath::UInt< value_size >::operator= | ( | const wchar_t * | s | ) |
this operator converts a string into its value (with base = 10)
Definition at line 3539 of file ttmathuint.h.
UInt<value_size>& ttmath::UInt< value_size >::operator= | ( | const std::wstring & | s | ) |
this operator converts a string into its value (with base = 10)
Definition at line 3550 of file ttmathuint.h.
UInt<value_size> ttmath::UInt< value_size >::operator~ | ( | ) | const |
bitwise operators
Definition at line 3895 of file ttmathuint.h.
uint ttmath::UInt< value_size >::Pow | ( | UInt< value_size > | pow | ) |
power this = this ^ pow binary algorithm (r-to-l)
return values:
Definition at line 2425 of file ttmathuint.h.
Referenced by ttmath::Int< exp >::DivInt().
void ttmath::UInt< value_size >::PrintLog | ( | const char_type * | msg, |
ostream_type & | output | ||
) | const |
this method is used when macro TTMATH_DEBUG_LOG is defined
Definition at line 159 of file ttmathuint.h.
void ttmath::UInt< value_size >::PrintLog | ( | const char_type * | msg, |
uint | carry, | ||
ostream_type & | output | ||
) | const |
this method is used when macro TTMATH_DEBUG_LOG is defined
Definition at line 169 of file ttmathuint.h.
void ttmath::UInt< value_size >::PrintTable | ( | ostream_type & | output | ) | const |
some methods used for debugging purposes
this method is only for debugging purposes or when we want to make a table of a variable (constant) in ttmathbig.h
it prints the table in a nice form of several columns
Definition at line 97 of file ttmathuint.h.
|
static |
this method is used when macro TTMATH_DEBUG_LOG is defined
Definition at line 135 of file ttmathuint.h.
Referenced by ttmath::UInt< man >::PrintLog(), and ttmath::UInt< man >::PrintVectorLog().
|
static |
this method is used when macro TTMATH_DEBUG_LOG is defined
Definition at line 148 of file ttmathuint.h.
uint ttmath::UInt< value_size >::Rcl | ( | uint | bits, |
uint | c = 0 |
||
) |
moving all bits into the left side 'bits' times return value <- this <- C
bits is from a range of <0, man * TTMATH_BITS_PER_UINT> or it can be even bigger then all bits will be set to 'c'
the value c will be set into the lowest bits and the method returns state of the last moved bit
Definition at line 460 of file ttmathuint.h.
Referenced by ttmath::UInt< man >::CompensationToLeft(), ttmath::UInt< man >::Div1(), ttmath::UInt< man >::operator~(), ttmath::Big< exp, man >::RemainFraction(), and ttmath::Big< exp, man >::ToInt().
uint ttmath::UInt< value_size >::Rcr | ( | uint | bits, |
uint | c = 0 |
||
) |
moving all bits into the right side 'bits' times c -> this -> return value
bits is from a range of <0, man * TTMATH_BITS_PER_UINT> or it can be even bigger then all bits will be set to 'c'
the value c will be set into the highest bits and the method returns state of the last moved bit
Definition at line 555 of file ttmathuint.h.
Referenced by ttmath::Big< exp, man >::BitAnd(), ttmath::Big< exp, man >::BitOr(), ttmath::Big< exp, man >::BitXor(), ttmath::Big< exp, man >::ChangeSign(), ttmath::Big< exp, man >::MulUInt(), ttmath::UInt< man >::operator~(), ttmath::Big< exp, man >::Pow(), ttmath::UInt< man >::Sqrt(), ttmath::Big< exp, man >::ToDouble(), and ttmath::Big< exp, man >::ToInt().
uint ttmath::UInt< value_size >::SetBit | ( | uint | bit_index | ) |
setting the 'bit_index' bit and returning the last state of the bit
bit_index bigger or equal zero
Definition at line 726 of file ttmathuint.h.
Referenced by ttmath::UInt< man >::Div2().
|
static |
this method sets a special bit in the 'value' and returns the last state of the bit (zero or one)
this method is created only on a 64bit platform***
bit is from <0,63>
e.g. uint x = 100; uint bit = SetBitInWord(x, 3); now: x = 108 and bit = 0
Definition at line 1020 of file ttmathuint_x86_64.h.
void ttmath::UInt< value_size >::SetFromTable | ( | const unsigned int * | temp_table, |
uint | temp_table_len | ||
) |
this method copies the value stored in an another table (warning: first values in temp_table are the highest words – it's different from our table)
this method is created only on a 64bit platform***
we copy as many words as it is possible
if temp_table_len is bigger than value_size we'll try to round the lowest word from table depending on the last not used bit in temp_table (this rounding isn't a perfect rounding – look at the description below)
and if temp_table_len is smaller than value_size we'll clear the rest words in the table
warning: we're using 'temp_table' as a pointer at 32bit words
Definition at line 325 of file ttmathuint.h.
Referenced by ttmath::Big< exp, man >::SetE(), ttmath::Big< exp, man >::SetLn10(), ttmath::Big< exp, man >::SetLn2(), ttmath::UInt< man >::Swap(), and ttmath::Big< exp, man >::Swap().
void ttmath::UInt< value_size >::SetMax | ( | ) |
this method sets the max value which this class can hold (all bits will be one)
Definition at line 215 of file ttmathuint.h.
Referenced by ttmath::Int< exp >::SetMax(), ttmath::Big< exp, man >::SetMax(), ttmath::Big< exp, man >::SetMin(), and ttmath::Int< exp >::SetSignOne().
void ttmath::UInt< value_size >::SetMin | ( | ) |
this method sets the min value which this class can hold (for an unsigned integer value the zero is the smallest value)
Definition at line 228 of file ttmathuint.h.
void ttmath::UInt< value_size >::SetOne | ( | ) |
this method sets one
Definition at line 202 of file ttmathuint.h.
Referenced by ttmath::UInt< man >::Div(), ttmath::Int< exp >::Pow(), and ttmath::UInt< man >::Pow().
void ttmath::UInt< value_size >::SetZero | ( | ) |
this method sets zero
Definition at line 188 of file ttmathuint.h.
Referenced by ttmath::Big< exp, man >::Big(), ttmath::Int< exp >::ChangeSign(), ttmath::UInt< man >::ClearFirstBits(), ttmath::UInt< man >::Div(), ttmath::UInt< man >::Div1(), ttmath::UInt< man >::Div2(), ttmath::UInt< man >::Div3(), ttmath::Big< exp, man >::Exp(), ttmath::UInt< man >::MulBig(), ttmath::UInt< man >::MulFastestBig(), ttmath::UInt< man >::MulInt(), ttmath::Int< exp >::SetMin(), ttmath::UInt< man >::SetMin(), ttmath::UInt< man >::SetOne(), ttmath::Big< exp, man >::SetOne(), ttmath::Big< exp, man >::SetZero(), ttmath::UInt< man >::Sqrt(), ttmath::Big< exp, man >::Standardizing(), ttmath::Big< exp, man >::ToInt(), and ttmath::UInt< man >::ToString().
uint ttmath::UInt< value_size >::Size | ( | ) | const |
this method returns the size of the table
Definition at line 179 of file ttmathuint.h.
void ttmath::UInt< value_size >::Sqrt | ( | ) |
square root e.g. Sqrt(9) = 3 ('digit-by-digit' algorithm)
Definition at line 2461 of file ttmathuint.h.
uint ttmath::UInt< value_size >::Sub | ( | const UInt< value_size > & | ss2, |
uint | c = 0 |
||
) |
this method's subtracting ss2 from the 'this' and subtracting carry if it has been defined (this = this - ss2 - c)
this method is created only on a 64bit platform***
c must be zero or one (might be a bigger value than 1) function returns carry (1) (if it was)
Definition at line 460 of file ttmathuint_x86_64.h.
Referenced by ttmath::Int< exp >::ChangeSign(), ttmath::UInt< man >::Div1(), ttmath::UInt< man >::operator-(), ttmath::UInt< man >::Sqrt(), and ttmath::Int< exp >::Sub().
uint ttmath::UInt< value_size >::SubInt | ( | uint | value, |
uint | index = 0 |
||
) |
this method subtracts one word (at a specific position) and returns a carry (if it was)
this method is created only on a 64bit platform***
if we've got (value_size=3):
table[0] = 10; table[1] = 30; table[2] = 5;
and we call:
SubInt(2,1)
then it'll be:
table[0] = 10; table[1] = 30 - 2; table[2] = 5;
of course if there was a carry from table[2] it would be returned
Definition at line 530 of file ttmathuint_x86_64.h.
Referenced by ttmath::Int< exp >::SubInt(), and ttmath::UInt< man >::SubOne().
uint ttmath::UInt< value_size >::SubOne | ( | ) |
this method subtracts one from the existing value
Definition at line 395 of file ttmathuint.h.
Referenced by ttmath::Big< exp, man >::ChangeSign(), ttmath::UInt< man >::operator++(), and ttmath::Int< exp >::SubOne().
|
static |
this static method subtractes one vector from the other 'ss1' is larger in size or equal to 'ss2'
result - is the result vector (which has size the same as ss1: ss1_size)
Example: ss1_size is 5, ss2_size is 3 ss1: ss2: result (output): 5 1 5-1 4 3 4-3 2 7 2-7 6 6-1 (the borrow from previous item) 9 9 return (carry): 0 of course the carry (borrow) is propagated and will be returned from the last item (this method is used by the Karatsuba multiplication algorithm)
Definition at line 597 of file ttmathuint_x86_64.h.
void ttmath::UInt< value_size >::Swap | ( | UInt< value_size > & | ss2 | ) |
this method swappes this for an argument
Definition at line 239 of file ttmathuint.h.
Referenced by ttmath::Big< exp, man >::Swap().
uint ttmath::UInt< value_size >::ToInt | ( | uint & | result | ) | const |
this method converts the value to uint type can return a carry if the value is too long to store it in uint type
Definition at line 3129 of file ttmathuint.h.
Referenced by ttmath::UInt< man >::ToInt().
uint ttmath::UInt< value_size >::ToInt | ( | sint & | result | ) | const |
this method converts the value to sint type (signed integer) can return a carry if the value is too long to store it in sint type
Definition at line 3139 of file ttmathuint.h.
uint ttmath::UInt< value_size >::ToInt | ( | unsigned int & | result | ) | const |
this method converts the value to a 32 unsigned integer can return a carry if the value is too long to store it in this type this method is created only on a 64 bit platform ***
Definition at line 3244 of file ttmathuint.h.
uint ttmath::UInt< value_size >::ToInt | ( | int & | result | ) | const |
this method converts the value to a 32 signed integer can return a carry if the value is too long to store it in this type this method is created only on a 64 bit platform ***
Definition at line 3255 of file ttmathuint.h.
void ttmath::UInt< value_size >::ToString | ( | std::string & | result, |
uint | b = 10 |
||
) | const |
this method converts the value to a string with a base equal 'b'
Definition at line 3370 of file ttmathuint.h.
Referenced by ttmath::UInt< man >::operator~(), and ttmath::UInt< man >::ToString().
void ttmath::UInt< value_size >::ToStringBase | ( | string_type & | result, |
uint | b = 10 , |
||
bool | negative = false |
||
) | const |
an auxiliary method for converting to a string it's used from Int::ToString() too (negative is set true then)
Definition at line 3316 of file ttmathuint.h.
Referenced by ttmath::Int< exp >::ToInt(), and ttmath::UInt< man >::ToString().
|
protected |
an auxiliary method for converting into the string it returns the log (with the base 2) from x where x is in <2;16>
Definition at line 3281 of file ttmathuint.h.
Referenced by ttmath::UInt< man >::ToStringBase().
uint ttmath::UInt< value_size >::ToUInt | ( | ) | const |
this method returns the lowest value from table
we must be sure when we using this method whether the value will hold in an uint type or not (the rest value from the table must be zero)
Definition at line 3103 of file ttmathuint.h.
Referenced by ttmath::Big< exp, man >::Big(), ttmath::Int< exp >::ToInt(), ttmath::UInt< man >::ToInt(), and ttmath::Int< exp >::ToUInt().
uint ttmath::UInt< value_size >::ToUInt | ( | uint & | result | ) | const |
this method converts the value to uint type can return a carry if the value is too long to store it in uint type
Definition at line 3113 of file ttmathuint.h.
uint ttmath::UInt< value_size >::ToUInt | ( | unsigned int & | result | ) | const |
this method converts the value to a 32 unsigned integer can return a carry if the value is too long to store it in this type this method is created only on a 64 bit platform ***
Definition at line 3224 of file ttmathuint.h.
|
friend |
output to standard streams
Definition at line 4028 of file ttmathuint.h.
|
friend |
output to standard streams
Definition at line 4039 of file ttmathuint.h.
|
friend |
input from standard streams
Definition at line 4086 of file ttmathuint.h.
|
friend |
input from standard streams
Definition at line 4097 of file ttmathuint.h.
uint ttmath::UInt< value_size >::table[value_size] |
buffer for the integer value table[0] - the lowest word of the value
Definition at line 81 of file ttmathuint.h.
Referenced by ttmath::UInt< man >::Add(), ttmath::Big< exp, man >::Big(), ttmath::UInt< man >::BitAnd(), ttmath::UInt< man >::BitOr(), ttmath::UInt< man >::BitXor(), ttmath::UInt< man >::CmpBigger(), ttmath::UInt< man >::CmpBiggerEqual(), ttmath::UInt< man >::CmpEqual(), ttmath::UInt< man >::CmpSmaller(), ttmath::UInt< man >::CmpSmallerEqual(), ttmath::UInt< man >::Div3(), ttmath::Int< exp >::DivInt(), ttmath::Big< exp, man >::Exp(), ttmath::Big< exp, man >::FromBig(), ttmath::Big< exp, man >::FromDouble(), ttmath::Big< exp, man >::FromInt(), ttmath::Big< exp, man >::FromUInt(), ttmath::UInt< man >::FromUInt(), ttmath::Big< exp, man >::IsInteger(), ttmath::Big< exp, man >::Mul(), ttmath::UInt< man >::Mul1Big(), ttmath::UInt< man >::Mul2(), ttmath::UInt< man >::Mul2Big(), ttmath::UInt< man >::Mul3(), ttmath::UInt< man >::Mul3Big(), ttmath::UInt< man >::MulFastest(), ttmath::UInt< man >::MulFastestBig(), ttmath::Big< exp, man >::MulUInt(), ttmath::UInt< man >::operator=(), ttmath::Int< exp >::operator==(), ttmath::Int< exp >::Pow(), ttmath::Big< exp, man >::Pow(), ttmath::UInt< man >::Pow(), ttmath::Big< exp, man >::SetOne(), ttmath::UInt< man >::Sqrt(), ttmath::UInt< man >::Sub(), ttmath::UInt< man >::Swap(), ttmath::Big< exp, man >::ToDouble(), ttmath::Big< exp, man >::ToInt(), ttmath::UInt< man >::ToString(), and ttmath::UInt< man >::UInt().