SubCol does not return the correct columns.
When I run this peace of code very strange things happend.
Matrix k = ((1,2,3),(1,2,3),(1,2,3));
Set s = SetOfReal(4.02,4.03);
Matrix m = SetCol(s);
Matrix f = Floor(m);
Matrix d = m - f;
Matrix p = RProd(d, 100);
Set s2 = MatSet(p);
Set s3 = BinGroup("<<", s2);
Matrix r = SubCol(k,s3);
WriteLn ("Set s2 = \n"<<s2);
WriteLn ("Matrix r = \n"<<r);
Matrix r2 = SubCol(k, SetOfReal(2, 3));
WriteLn ("Matrix r2 = \n"<<r2);
If I ask about any of the auxliary variables Tol answers correctly, but it has
problems with the SubCol function. It sometimes throws
"
Warning: Intento de acceso no válido de la función SubCol(k,[[ 2.000000,
3.000000 ]] )
", and gives out the wrong columns. Try changing the initial values in the "Set s",
it is a lot of fun.
Change History (3)
Resolution: |
→ fixed
|
Status: |
assigned →
closed
|
bug_file_loc: |
→ http://cvs.tol-project.org/viewcvs.cgi/tol_tests/tol/Bugzilla/bug_000044
|
A solution for this problem has been deployed in Tol CVS.
The problem was a conversion to get column number in SubCol function. SubCol get
1.9999999999999574 as the first column, and after an Integer conversion it turns to 1.
The solution apply Round method of BDat class to get the correct column value.