Uploaded image for project: 'OASIS Open Data Protocol (OData) TC'
  1. OASIS Open Data Protocol (OData) TC
  2. ODATA-1032

Define comparison for numeric value exceptions

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: V4.0_CSD03, V4.01_CSD01
    • Fix Version/s: V4.01_CSD02
    • Component/s: URL Conventions
    • Labels:
      None
    • Environment:

      Applied

      Description

      We describe comparison operations with null, but not with NaN, -INF and INF.

      For NaN IEEE754, says that NaN is unordered and not equal to itself, meaning that NaN compared to anything, including NaN, is false except for != which is true.

      This makes sense mathematically; however, this makes it very hard to find all resources with a property value of NaN (we would have to add a separate IsNaN() operator, and comparisons would have to account for this in their expressions). We could say that NaN==NaN, similar to how we say Null==Null to make it easier to search for Null values.

      For INF, -INF, IEEE754 appears to define INF==INF and -INF==-INF, so we would have:
      INF == INF: True
      INF != INF: False
      INF < INF: False
      INF <= INF: True
      INF > INF: False
      INF >= INF: True
      INF < <valid number>: False
      INF <= <valid number>: False
      INF > <valid number: True
      INF >= <valid number>: True
      INF > -INF: True
      -INF == -INF: True
      -INF != -INF: False
      -INF < -INF: False
      -INF <= -INF: True
      -INF > -INF: False
      -INF >= -INF: Tru
      -INF < <valid number>: True
      -INF <= <valid number>: True
      -INF > <valid number>: False
      -INF >= <valid number>: False
      -INF > INF: False

        Attachments

          Activity

            People

            • Assignee:
              mikep Michael Pizzo (Inactive)
              Reporter:
              mikep Michael Pizzo (Inactive)
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: