Implement select/median for float and double.