Hi guys, during the development of Swaylend I developed my custom I64 number standard because at that time I had problems with this standard from sway libs
It works like this: we have a struct I64 with value that represents absolute value and negative that represents a sign and batch of functions and operators
I studied how I64 works from sway libs, it takes the number 922333372036854775808u64 which is 2^64 / 2 for zero, and turns out and what is less than it is the negative part of it
I think in terms of implementation this approach is more correct, but it imposes a limitation:
we have a positive part of the I64 number commensurate with the u32 dimension and in some places I am stuck with arithmetic overflow, To avoid this I will have to use the I128 standard, which is created from u128, which is created from 2x u64 and I get my code clogged with a bunch of numeric transformations, which significantly increases code complexity
Can you please tell me what the right thing to do is?
I also found this library in swaylibs.
It looks like it might help me somehow, but I don’t understand how to work with it yet? Is this an implementation of what I was trying to visualize and can I replace my I64 with IFP64?