Skip to content
#

bignum

Here are 81 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
frangio
frangio commented Jan 2, 2019

Chai's members can be used to test that an array contains certain values, as determined by strict equality or optionally deep equality.

Neither of those is appropriate to test arrays of big numbers (although deep equality works, it isn't ideal). We could maybe make the bignumber property modify members to compare values using bignumber equ

good first issue

Improve this page

Add a description, image, and links to the bignum 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 bignum topic, visit your repo's landing page and select "manage topics."

Learn more