You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Split out the extended functions (saving destroyed bits) off iusrhn() into a specific shift right version, because it is only used in MPrime.split() and is complex.
Remove internal functions from the BN context (good candidates are: _countBits, _zeroBits, etc. Others could be moved too with passing a self variable instead of using this, however that might have a speed penalty or increase?)
Perhaps rethink naming/functionality of the following bitwise methods: setn (should be renamed isetn as it is in-place), testn, maskn, bincn
(Taking the discussion from #112 to here)
Proposed changes:
.modn()return a BN (modn API inconsistency #112).strip()to._strip()is a breaking change too (readme: document strip() and toJSON() #105).andln()to.andn()(see the README). Perhaps fold the functionality intotoArrayLikeand make.andn()safe in terms of working up to 53 bitsiusrhn()into a specific shift right version, because it is only used inMPrime.split()and is complex._countBits,_zeroBits, etc. Others could be moved too with passing aselfvariable instead of using this, however that might have a speed penalty or increase?)setn(should be renamedisetnas it is in-place),testn,maskn,bincn