diff --git a/CHANGELOG b/CHANGELOG index 9d084de..646bf4a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -66,6 +66,10 @@ Version 0.9.0 prerelease (2009.11.24): 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 + * added: UInt::operator>>(int) + UInt::operator>>=(int) + UInt::operator<<(int) + UInt::operator<<=(int) * changed: Factorial() is using the Gamma() function now * changed: Big::Div(ss2) Big::Mod(ss2) diff --git a/ttmath/ttmathuint.h b/ttmath/ttmathuint.h index 88c725e..311e945 100644 --- a/ttmath/ttmathuint.h +++ b/ttmath/ttmathuint.h @@ -3242,7 +3242,40 @@ public: } + UInt operator>>(int move) + { + UInt temp( *this ); + temp.Rcr(move); + + return temp; + } + + + UInt & operator>>=(int move) + { + Rcr(move); + + return *this; + } + + + UInt operator<<(int move) + { + UInt temp( *this ); + + temp.Rcl(move); + + return temp; + } + + + UInt & operator<<=(int move) + { + Rcl(move); + + return *this; + } /*!