Add gr_mat_pow_ui and gr_mat_pow_fmpz, use it in added fmpz_mod_mat_pow_ui - #2189
Conversation
|
I wonder if this should use GR instead? @fredrik-johansson |
|
Arguably there should be separate methods
Currently there is no |
true, I'll rename the function here to
I could look into this instead of the writing more or less the same function for different types |
fmpz_mod_mat_powgr_mat_pow_ui, use it in added fmpz_mod_mat_pow_ui
It's a good idea. Actually, it would be interesting to compare a direct implementation of One could also have |
7445fb5 to
35f8a93
Compare
|
I am experiencing a segfault in the |
|
Looks good. Do you want to do |
tests are failing
gr_mat_pow_ui, use it in added fmpz_mod_mat_pow_uigr_mat_pow_ui and gr_mat_pow_fmpz, use it in added fmpz_mod_mat_pow_ui
| fmpz_mat_init(U, d, d); | ||
|
|
||
| for (i = ((slong) FLINT_BIT_COUNT(exp)) - 2; i >= 0; i--) | ||
| for (i = FLINT_BIT_COUNT(exp) - 2; i >= 0; i--) |
There was a problem hiding this comment.
The cast was removed on purpose?
There was a problem hiding this comment.
by request of @albinahlback in #2189 (comment)
|
LGTM! |
My first contribution from the workshop (I don't have the rights to add the label myself, could someone please do that for me and/or give me the appropriate rights?).
To be used in Nemo in https://github.com/lgoettgens/Nemo.jl/blob/d12b72e291400fe9609706564cdb289eee472943/src/flint/fmpz_mod_mat.jl#L270-L281.