(Go: >> BACK << -|- >> HOME <<)

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mpn_extras naming #1935

Open
fredrik-johansson opened this issue Apr 29, 2024 · 3 comments
Open

mpn_extras naming #1935

fredrik-johansson opened this issue Apr 29, 2024 · 3 comments

Comments

@fredrik-johansson
Copy link
Collaborator

The flint_mpn prefix is rather clumsy. We could consider using the nn_ prefix for our multi-limb natural number functions, similar to bsdnt:

https://github.com/wbhart/bsdnt/blob/master/nn.h

@albinahlback
Copy link
Collaborator

After thinking very hard, I am in favor of this. I would have liked to keep the mpn prefix, but it does make it harder work together with GMP and, as you say, adding the flint onto that does make it more clumsy.

@albinahlback
Copy link
Collaborator

I think I would like to abbreviate names in the mpn_extras module even more, just like GMP.

Examples:

flint_mpn_mulhigh_7 -> nn_mulhi_8
flint_mpn_sqrhigh_normalised_4 -> nn_sqrhi_4n
flint_mpn_mullow_8 -> nn_mullo_8

I liked having verbose names in the beginning, but now it becomes annoying with the long names. Although it is not necessary to abbreviate sqrhigh to sqrhi, it is useful for editing and viewing when names are equally long. And this is very low-level, so it will probably not affect end-users.

@fredrik-johansson
Copy link
Collaborator Author

Fine with me.

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

No branches or pull requests

2 participants