Opened 12 years ago
Closed 12 years ago
#309 closed bug (fixed)
sort for intvec, list{intvec}
Reported by: | Oleksandr | Owned by: | somebody |
---|---|---|---|
Priority: | major | Milestone: | 3-1-3 and higher |
Component: | singular-libs | Version: | 3-1-2 |
Keywords: | sort, intvec | Cc: |
Description
Currently our sort
(from general.lib
) is abused for sorting intvec/list of intvec's, and it does NOT work if there are negative (and maybe zero) entries:
> sort(3..-3)[1]; 0,1,2,3,-1,-2,-3 > intvec v = 1,10,9,8,7,6,5,2,3,4; > sort(list(-v, v))[1]; [1]: -1,-10,-9,-8,-7,-6,-5,-2,-3,-4 [2]: 1,10,9,8,7,6,5,2,3,4
Note: See
TracTickets for help on using
tickets.
fixed by a new sorting routine for list/intvec in general.lib