int nSize = (bits + 7) / 8;
uint nCompact = 0;
if (nSize <= 3)
- nCompact = ((uint)Low64) << 8 * (3 - nSize);
+ nCompact = Low32 << 8 * (3 - nSize);
else
{
uint256 bn = this >> 8 * (nSize - 3);
- nCompact = (uint)bn.Low64;
+ nCompact = bn.Low32;
}
if ((nCompact & 0x00800000) != 0)
return result;
}
- public static uint256 operator *(uint256 a, uint b)
+ public static uint256 operator *(uint256 a, ulong b)
{
var result = new uint256();
do
{
- c += a.pn[i] * (ulong)b;
+ c += a.pn[i] * b;
result.pn[i] = (uint)c;
c >>= 32;
} while (++i < result.nWidth);
return b;
}
- return a * b.pn[0];
+ return b * a.pn[0];
}
int m = a.bits / 32 + (a.bits % 32 != 0 ? 1 : 0);