In general, use map<double, some_value>, just as you would with any other
However, I wouldn't recommend that because floating point calculations are
alway slightly unprecise because there is only a limited number to contain
an infinite range. For example 1.2 can't be expressed as a float or double
- depending on the precision, the closest approximation in either a bit
above or below, but never the exact number. This makes comparisons for
equality moot, you always need to look if a number is in a certain range.
Now, in order to give a better advise what to use, we'd first need to know
what problem you're trying to solve.