The C greater function is unnecessarily long
int greater(const void* p, const void* q)
{
return *(double *)p - *(double *)q;
}
would work just as well.EDIT: DON'T USE THIS, WONT ALWAYS WORK