| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Also indentation and style
|
I think n_remove2_precomp is slow and shouldn't be used for removing (powers of) p. It's better to use bit manipulation when p = 2 and n_divisible_odd_gm + multiplication by 1/p mod 2^64 when p is odd. This is done in radix (https://github.com/flintlib/flint/blob/main/src/radix/init_clear.c). Actually I'm wondering if more code reuse between this and radix isn't possible. Hmm. |
Sorry, something went wrong.
|
By the way, I think I'm now leaning toward naming the slots u and v (and N for the error), matching padic, which I've also done in padic_radix. This is concise and mnemonic enough. I think it would be really good to have error tracking built into this module as well. One option is to have a pair of types (slightly verbose):
Another option would be to have just one type with floating-point/ball mode selected by the context object. I think this is the right choice for padic_radix if we want to add a floating-point mode there. But for padic_nmod the overhead of 1.5x more storage is not negligible... |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This PR implements a new representation for $p$-adic numbers with low precision. This new package uses the floating point representation, as detailed in #2447.
This is not meant as a replacement for the current padic package, as this new approach needs error tracking.
Currently, this PR only implements the most basic arithmetic operations.