! multiplication: this = this * ss2 it returns carry if it has been */
| 942 | it returns carry if it has been |
| 943 | */ |
| 944 | uint Mul1Ref(const UInt<value_size> & ss2) |
| 945 | { |
| 946 | TTMATH_REFERENCE_ASSERT( ss2 ) |
| 947 | |
| 948 | UInt<value_size> ss1( *this ); |
| 949 | SetZero(); |
| 950 | |
| 951 | for(uint i=0; i < value_size*TTMATH_BITS_PER_UINT ; ++i) |
| 952 | { |
| 953 | if( Add(*this) ) |
| 954 | { |
| 955 | TTMATH_LOGC("UInt::Mul1", 1) |
| 956 | return 1; |
| 957 | } |
| 958 | |
| 959 | if( ss1.Rcl(1) ) |
| 960 | if( Add(ss2) ) |
| 961 | { |
| 962 | TTMATH_LOGC("UInt::Mul1", 1) |
| 963 | return 1; |
| 964 | } |
| 965 | } |
| 966 | |
| 967 | TTMATH_LOGC("UInt::Mul1", 0) |
| 968 | |
| 969 | return 0; |
| 970 | } |
| 971 | |
| 972 | |
| 973 | public: |