Draft
Conversation
Artoria2e5
commented
Mar 12, 2024
| inline unsigned long long to_ulonglong(const ZZ& a) { return (unsigned long long) _ntl_gtoudint(a.rep); } | ||
| inline void conv(ZZ& x, unsigned long long a) { _ntl_gudintoz(a, &x.rep); } | ||
| inline ZZ to_ZZ(unsigned long long a) { return ZZ(INIT_VAL, a); } | ||
| #endif |
Author
There was a problem hiding this comment.
would be nice to always offer _ntl_gtoudint using the NTL_ULL_TYPE too... right now vigna/CPRNG makes its own int128 routines. or is that too greedy?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is my draft for fixing #28; it only handles
NTL_BITS_PER_LONGLONG == NTL_BITS_PER_LONGfor now. There are a couple of undone things and some questions from me:bpll, should I use a loop like the other types are using?doc/conversions.txtis not yet updatedNTL_BITS_PER_LONGLONG == (2*NTL_BITS_PER_LONG). For this case, my idea is that we add some functions tolip.cppthat useNTL_ULL_TYPEand potentially a new signedNTL_LL_TYPE. Is that acceptable (or needed in the first place)?Alright, I tried my hand at
lip. It's not pretty.