bedatadriven/renjin — pull request #92 by acaloiaro (2014-12-13 19:53:28+00:00)
Title: Fixes an edge case that can lead to different sample() values between Renjin and GNU R

HeapsortTandem's `heapsortDescending()` is based on GNU R's sort.c `revsort()` function. My translation was not entirely correct, exposing `sample()` to sorting edge cases that could lead to different samples between GNU R and Renjin.

I validated the current implementation by sorting 1,000,000 random doubles.