in reply to Divide array of integers into most similar value halves
You could look here, part of the Stony Brook Algorithm Repository. They even have implementations.
Information about American English usage here and here. Floating point issues? Please read this before posting. — emc