We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
gr_poly_integral
Example code:
#include <stdio.h> #include "flint/gr_poly.h" int main() { int status = GR_SUCCESS; gr_ctx_t ctx; gr_ctx_init_fmpq(ctx); gr_ctx_t mat_ctx; gr_ctx_init_matrix_ring(mat_ctx, ctx, 2); gr_poly_t f; gr_poly_init(f, mat_ctx); status |= gr_poly_gen(f, mat_ctx); printf("f = "); gr_poly_print(f, mat_ctx); printf("\n"); status |= gr_poly_integral(f, f, mat_ctx); if (status == GR_SUCCESS) { printf("integral(f) = "); gr_poly_print(f, mat_ctx); printf("\n"); } else { printf("failed to calculate integral(f)\n"); } gr_poly_clear(f, mat_ctx); gr_ctx_clear(mat_ctx); gr_ctx_clear(ctx); flint_cleanup_master(); return 0; }
Output:
f = [[1, 0], [0, 1]]*x failed to calculate integral(f)
The reason is that gr_div_ui fails for elements of a matrix ring. For example:
gr_div_ui
gr_ptr res; GR_TMP_INIT(res, mat_ctx); int my_status = gr_one(res, mat_ctx); my_status |= gr_div_ui(res, res, 12, mat_ctx); printf("success = %d\n", (my_status == GR_SUCCESS)); GR_TMP_CLEAR(res, mat_ctx);
outputs success = 0, even though there would be a well-defined result.
success = 0
The text was updated successfully, but these errors were encountered:
gr_mat is missing most scalar methods. Will fix.
gr_mat
Sorry, something went wrong.
No branches or pull requests
Example code:
Output:
The reason is that
gr_div_ui
fails for elements of a matrix ring. For example:outputs
success = 0
, even though there would be a well-defined result.The text was updated successfully, but these errors were encountered: