Open discussion for MAGMA library (Matrix Algebra on GPU and Multicore Architectures)
-
mv3
- Posts: 2
- Joined: Mon Feb 16, 2015 5:57 pm
Post
by mv3 » Mon Feb 16, 2015 6:11 pm
Is it possible to store a sting with rational numbers that come from variables. For instance, if x = 4/3 I would like something like
Code: Select all
s:= "this string contains the rational number" x;
I am working with n-tuples for large n where many of the entries are 0. I just want to create a string that tells me the non-zero entries and which position they are in for example:
(0 0 0 0 4/3 0 0 0 0 0 1/2 )
would be converted to "4/3 e_5 + 1/2 e_11" or something similar. For large n-tuples it is very tedious to count the number of zeros between nonzero entries. Can this be accomplished? I have a function that will do all the work but I can't get it to store the string with rational numbers in it.
Best,
Mike
-
mv3
- Posts: 2
- Joined: Mon Feb 16, 2015 5:57 pm
Post
by mv3 » Tue Feb 17, 2015 3:26 pm
My mistake! Thanks for pointing me in the right direction.