Opened 12 years ago

Closed 8 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)

**Note:**See TracTickets for help on using tickets.

Convert numbers to inexact in spearman-rank-correlation function