-
Notifications
You must be signed in to change notification settings - Fork 251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add gr_mat_pow_ui
and gr_mat_pow_fmpz
, use it in added fmpz_mod_mat_pow_ui
#2189
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_pow
gr_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_ui
gr_mat_pow_ui
and gr_mat_pow_fmpz
, use it in added fmpz_mod_mat_pow_ui
@@ -46,7 +46,7 @@ fmpz_mat_pow(fmpz_mat_t B, const fmpz_mat_t A, ulong exp) | |||
fmpz_mat_init_set(T, A); | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The cast was removed on purpose?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.