Skip to content
This repository was archived by the owner on Oct 31, 2024. It is now read-only.

Modulo after operations #6

Closed
s1na opened this issue Mar 12, 2019 · 1 comment
Closed

Modulo after operations #6

s1na opened this issue Mar 12, 2019 · 1 comment

Comments

@s1na
Copy link
Collaborator

s1na commented Mar 12, 2019

FixedBN performs bound-checking in its constructor. Most of the operations return a new BN instance (not a FixedBN), and because they have not been overriden they wouldn't necessarily have the specified width. Does it make sense to override such operations to cast them to FixedBN and do a modulo afterwards if necessary? Or should users of the library take care of this?

@axic
Copy link
Member

axic commented Mar 12, 2019

I think they should return a FixedBN instance. It should be possible to retrieve a BN instance out of a FixedBN instance.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants