Opened 10 years ago

Closed 6 years ago

#836 closed defect (wontfix)

statistics tests fail

Reported by: sjamaan Owned by: petercrlane
Priority: major Milestone:
Component: unknown Version: 4.7.x
Keywords: Cc:
Estimated difficulty:

Description

The statistics tests started failing after the release of version 2.8 of the numbers egg, see http://tests.call-cc.org/master/linux/x86/2012/05/06/salmonella-report/test/statistics.html for the earliest failure.

Unfortunately the spearman rank coefficient error is due to the use of the ~F format specifier. Numbers now tries harder to produce exact results for sqrt, which means that the number is not a flonum anymore, but a rational number. The "format" egg isn't aware of the numbers egg, so it gives an error (it doesn't understand that the ratnum type is a number). See the attached patch for a quick and dirty fix.

If you prefer returning exact numbers where possible, you could either convert the values to inexact only where they're printed (and change the value in the "check" call to be a fractional) or you could change the format call to use {{~A}}, which does print the number correctly (it'll use the core number->string which is overwritten by the numbers egg to do the right thing) and exactly.

Attachments (1)

inexacts.patch (786 bytes) - added by sjamaan 10 years ago.
Convert numbers to inexact in spearman-rank-correlation function

Download all attachments as: .zip

Change History (2)

Changed 10 years ago by sjamaan

Attachment: inexacts.patch added

Convert numbers to inexact in spearman-rank-correlation function

comment:1 Changed 6 years ago by sjamaan

Resolution: wontfix
Status: newclosed

Unmaintained egg

Note: See TracTickets for help on using tickets.