Skip to content
#

multi-precision

Here are 16 public repositories matching this topic...

aameen951
aameen951 commented May 11, 2020

Sorry for not submitting a pull request, I'm working on a bignum library and I saw your implementation of multiplication so I just want to point out that you can simplify it by doing the multiply and the add in one loop into the result bn as follow:

typedef unsigned int           u32;
typedef unsigned long long int u64;
void _bn_add_mul_u32(u32 *out, u32 *a, size_t a_len, u32 b)
{
mratsim
mratsim commented Sep 25, 2019

Seen with @arnetheduck.

for uint128, stint properly generates add + adc (see status-im/nim-stint#10)

But for uint256+, the way carry is done will loop multiple time on the low half
https://github.com/status-im/nim-stint/blob/9993b9dca4a2dbf76bc432252ad4e8db944ae831/stint/private/uint_addsub.nim#L17-L29

Important for WASM codesize optimization.

bug good first issue Performance

Improve this page

Add a description, image, and links to the multi-precision topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the multi-precision topic, visit your repo's landing page and select "manage topics."

Learn more