When using indexed object, I found the behavior of value 0.7 as the index quite strange, then did the following test.
The first output cell was executed directly as the second input cell.
Have not found other values with the same issue.
Edit: an example where non-int indexing is used in my intuitive but trouble-causing way.
SimuBody[p1_, p2_] := Table[N@Sin[p1 x], {x, 1, p2, 1}]
Table[p2 = 15; f[p1, p2] = SimuBody[p1, p2], {p1, 0.1, 0.7, 0.1}];
Table[p2 = 12;
f[p1, p2] = SimuBody[p1, p2], {p1, {2.2, 0.001, -\[Pi], 3.3}}];
Table[p2 = 5; f[p1, p2] = SimuBody[p1, p2], {p1, {7, 3.4}}];
g[a_Symbol] :=
DownValues[a] /. (HoldPattern[_[_[x__]]] :> z_) :> {{x}, z}
ftab = g[f];
ListPointPlot3D[
Transpose@{ftab[[All, 1, 1]], ftab[[All, 1, 2]], ftab[[All, 2, 1]]},
PlotRange -> All, Filling -> Bottom]
f[0.7, 15]
I started using this non-int indexing method after reading this, where the index does not even have to be a number. So I assumed using non-integer should be ok.

Indexed? – Szabolcs Nov 16 '15 at 14:55kand returnslist1. I use an indexed objectf[k]to map the resulting 'list1'. This mapping is intuitive to me, e.g. I can useListPlotto plot certain element inf[k]against all theks I have used in simulation. The thing is, I do not know in advance how manykI will need before getting the simulation reuslt, so it is awkward to use a fixed-sized list to store the data ofkandlist1. I will be glad if you can offer reference to a elegant method. – Chromatic Nov 16 '15 at 15:48Indexed. Now I see what you mean. I think using the term "indexing" here may be confusing to some. I agree with J.M., please edit the post and explain what you said in your comment, then also show how the problem with comparing floating point numbers comes up. The simplest solution is to avoid this sort of comparison, but there may be other ways too (e.g.Nearestfor binary search, etc.) My answer would depend on how exactly you end up comparing two floating point numbers which look the same but aren't really the same. – Szabolcs Nov 16 '15 at 16:170.7that you typed by hand to0.7that was generated byTable. Is this the only situation where the problem comes up? I would suggest trying to always work with the exact parameters (p1,p2values) that were generated by/for your simulation. Avoid using values you type by hand. When you want to find a value that you know exists, you can useNearestto extract it from an existing list ofp1-values. To make it easier to handle these, I suggest usingAssociationinstead ofDownValues. – Szabolcs Nov 16 '15 at 16:23resultsassociation which has elements of the formp1 -> res. You know based on something that it should have the key 0.7. But do not extract it asresults[0.7]. Instead use something likeresults[ Nearest[Keys[results], 0.7] ]. Performance shouldn't matter since you typed this by hand anyway. – Szabolcs Nov 16 '15 at 16:34f["0.7"] = 1– m_goldberg Nov 16 '15 at 16:49Associationlooks great! – Chromatic Nov 16 '15 at 18:31