How to sort decimal values in bash

Hi,

I have a list of values from associative array from 0,..till 1.0000.

I tried various sort options; sort -g, sort -nr but it still couldnt work. In other words, the numbers are not sorted accordingly.

Please help.
Thanks.

How is the array formatted ? Can you show few samples, is this different file ? Look here for pointers, and especially at Example 26-11.