I have written a program that generates a few N x N matrices for which I would like to compute their determinant. Related to this I have two questions
-
What library is the best for doing so? I would like the fastest possible library since I have millions of such matrices.
-
Are there any specifics I should take care of when casting the result to an integer? All matrices that I will generate have integer determinants and I would like to make sure that no rounding error skews the correct value of the determinant.
Edit. If possible provide an example of computing the determinant for the recommended library.
As for Matrix Libraries, it looks like that question is answered here:
Recommendations for a small c-based vector and matrix library
As for casting to an integer: if the determinant is not an integer, then you shouldn’t be casting it to an integer, you should be using
round,floor, orceilto convert it in an acceptable way. These will probably give you integral values, but you will still need to cast them; however, you will now be able to do so without fear of losing any information.