Opened 12 years ago
Closed 12 years ago
#296 closed bug (fixed)
Trivial bug or bad documentation of Tor (from homolog.lib)
Reported by: | Oleksandr | Owned by: | Oleksandr |
---|---|---|---|
Priority: | minor | Milestone: | 3-1-3 and higher |
Component: | singular-libs | Version: | 3-1-2 |
Keywords: | Tor, homolog_lib | Cc: |
Description
Tor's documentation says:
USAGE: Tor(v,M,N[,any]); v int resp. intvec, M,N modules COMPUTE: a presentation of Tor_k(M',N'), for k=v[1],v[2],... ... RETURN: - if v is of type int: module Tor, a presentation of Tor_k(M',N');@* - if v is of type intvec: a list of Tor_k(M',N') (k=v[1],v[2],...);@* - in case of a third argument of any type:
BUT: if 'v' contains negative last entries it may ONLY print:
// Tor_i=0 for i<0!
and return [1] without doing anything for other v[i]-s, since sort is wrong for such intvec-s:
> sort(3..-3)[1]; 0,1,2,3,-1,-2,-3
Please consider using sortIntvec from dmodapp.lib
Besides, the line
RETURN: - if v is of type int: module Tor, a presentation of Tor_k(M',N');@*
looks a bit strange (v<->k).
Change History (3)
comment:1 Changed 12 years ago by
comment:2 Changed 12 years ago by
Owner: | changed from somebody to Oleksandr |
---|
sort should do what it is supposed to; check kernel implementation vs. LIB implementation (general.lib), check usage in LIBs
comment:3 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
with the commit (http://www.singular.uni-kl.de:8002/trac/changeset/13800) I have fixed the bugs I found in homolog.lib
.
The buggy sort
goes to another ticket...
Note: See
TracTickets for help on using
tickets.
In fact using sort on an integer vector is an overkill just for computing the maximal entry... (the sorted intvec v1 is never used afterwards)