Vincent Torri on Thu, 09 Jun 2005 14:27:21 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: dumb question about rationals |
Hello, my program is almost working. But in some cases, i got the error message: impossible assignment I-->SIt occurs when i try to get the value of the denominator of a rational. The rational type is 4 and the denominator type is 1.
When could this error appear ? Another question: What i do is the following : 1) I allocate 2 arrays of GEN (with malloc), say t1, t2 2) I init the 2 arrays 3) I do my stuff (a loop) : a) i fill t2 with modified values of t1 b) t1 = t2 (i do a loop on k : t1[k] = t2[k]) 4) store the values of t1, at the end of the loop 5) I free the 2 arrays.Could the problem above (it appears in step 4) arise from the fact that I use allocated arrays and I'm doing step 3)b) ? Should I use PARI vector instead of arrays ?
Thank you. Vincent Torri