flint icon indicating copy to clipboard operation
flint copied to clipboard

mpn_extras naming

Open fredrik-johansson opened this issue 1 year ago • 3 comments

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

fredrik-johansson avatar Apr 29 '24 07:04 fredrik-johansson

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 avatar Apr 29 '24 20:04 albinahlback

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.

albinahlback avatar May 24 '24 17:05 albinahlback

Fine with me.

fredrik-johansson avatar May 24 '24 18:05 fredrik-johansson