flintlib / flint

FLINT (Fast Library for Number Theory)
http://www.flintlib.org
GNU Lesser General Public License v3.0
403 stars 235 forks source link

mpn_extras naming #1935

Open fredrik-johansson opened 2 months ago

fredrik-johansson commented 2 months ago

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 commented 2 months ago

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 commented 1 month ago

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 commented 1 month ago

Fine with me.