MaxGraey / as-bignum

Fixed length big numbers for AssemblyScript 🚀

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Enhancement for integer type i128

van-bright opened this issue · comments

Hi, My project depends on as-bignum very much, it does huge help for me. But the implementation of i128 leaves some methods like toArrayBufferLE, toArrayBufferBE etc, which exist on u128.
Can we provide these functions in next version?
Thanks

Hey @MaxGraey
Do you think it would be easy to implement mul and div?
Thanks

Yes. While div / mul already implemented for u128 we can reuse it for i128. Just need to some minor preprocessing (make input args absolute) and add proper sign to result.
Unfortunately, as-pect is broken now, and it seems doesn't maintain anymore, so testing it might be tricky.
Anyway PR are welcomed!