I am trying solve some matrices calculations using the MathNet.Numerics
libraries. It all works fine with double numbers. However now I want to represent numbers as fractions and want to get the answers to the calculations as fractions. How can I do that?
What I am currently doing is this.
var M = Matrix<double>.Build;
var V = Vector<double>.Build;
double [,] x1 = {
{0, 0, 0},
{1.0/2, 0 , 0},
{1.0/2, 1.0, 1.0}
};
var m = M.DenseOfArray(x1);
These fractions gets converted into doubles and the final answer will be in doubles. I want to retain fractions throughout the calculation.