Opened 14 years ago
Closed 10 years ago
#837 closed defect (wontfix)
statistics: some bugs
| Reported by: | sjamaan | Owned by: | petercrlane |
|---|---|---|---|
| Priority: | minor | Milestone: | |
| Component: | extensions | Version: | 4.7.x |
| Keywords: | Cc: | ||
| Estimated difficulty: |
Description (last modified by )
The scrutinizer found a few bugs in statistics (see http://tests.call-cc.org/master/linux/x86/2012/05/12/salmonella-report/install/statistics.html). The first one in wilcoxon-signed-rank-test initially looked like a simple mistake of swapping the arguments to list-ref, but even after fixing that I was unable to get it to do anything but error out.
#1;> (use statistics srfi-1) #2;> (wilcoxon-signed-rank-test (iota 17)) ;; ERROR
After adding some debugging code, it looks like the indexes are wrong; last is determined counting from the end of the list, but it *looks* like the code is treating it as if it's counted from the front. After changing that accordingly I still kept getting errors, so I'll leave that to you. I decided to let my patch simply fix these warnings and nothing more.
The second message about wilcoxon-signed-rank-test refers to the fact that var-r1 is being applied as if it were a procedure. However, it's just a number, so this would fail.
The warning about mcnemars-test is due to the fact that the return value of set! is undefined in Scheme (this is different from Common Lisp, where setf returns the last value set, I think). I don't really understand the purpose of the named let, so I didn't touch it (instead just doing a simple transformation that's always safe), but it really looks like it doesn't do anything at all.
Attached is a patch that gets rid of these warnings.
Attachments (1)
Change History (3)
Changed 14 years ago by
| Attachment: | scrutiny-fixes.patch added |
|---|
comment:1 Changed 14 years ago by
| Description: | modified (diff) |
|---|
comment:2 Changed 10 years ago by
| Resolution: | → wontfix |
|---|---|
| Status: | new → closed |

Unmaintained egg