int256
int256 copied to clipboard
wrong Double to UInt256 conversion
Issue can be easily tested with this snippet:
double d = 1E+20d;
UInt256 u = (UInt256)d;
Console.WriteLine(u); // 0
The problem goes deeper to
Lsh(in UInt256 x, int n, out UInt256 res)
when in and out params are the same
var u = new UInt256(1);
UInt256.Lsh(in u, 1, out u);
Console.WriteLine(u); // 0
Resolved by https://github.com/NethermindEth/int256/pull/44 and https://github.com/NethermindEth/int256/pull/43 with full tests for all parameters