Skip to content

modn API inconsistency #112

@axic

Description

@axic

All mod/div methods return a BN instance, except modn which returns a JS Number.

I think it would make sense making the current modn internal (prefixing it with _) so that toString can keep using it the fastest way, and creating a new modn which returns a BN instance.

divmod already encapsulates a modn result as a BN instance so it should use the new method.

Comments?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions