I have by chance discovered how ArcMap displays special floating point values to the user.
- +∞ (positive infinity) is displayed as
1.#INF
- –∞ (negative infinity) would supposedly be displayed as
-1.#INF
— I haven't verified this one. NaN (not a number) is displayed as a right-aligned
<Null>
— not to be confused with left-aligned<Null>
, which denotes NULL (missing values):(Get unique values in the field calculator does not list NaN at all, by the way.)
But I haven't discovered how to write layer definition queries to select rows based on these special values:
ColumnName IS NULL
will only select regular NULL values, but non NaN.ColumnName = 1.#INF
is rejected as having invalid syntax.
Does anyone know how to do this?
C# ArcObjects code snippet for storing a 1.#INF value to a table field (basic concept):
As requested. Since I'm no longer at work, the following is not the real code I used and I cannot test it right now, but it should produce the effect shown in the screenshot above:
ITable table = …;
int doubleFieldIndex = table.FindField(…);
IRow row = table.CreateRow();
row.Value[doubleFieldIndex] = double.PositiveInfinity;
row.Store();