[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: [OASIS Issue Tracker] (ODATA-1032) Define comparison for numeric value exceptions
[ https://issues.oasis-open.org/browse/ODATA-1032?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ralf Handl updated ODATA-1032: ------------------------------ 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 was: 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: False INF > INF: False INF >= INF: False 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: False -INF > -INF: False -INF >= -INF: False -INF < <valid number>: True -INF <= <valid number>: True -INF > <valid number>: False -INF >= <valid number>: False -INF > INF: False > Define comparison for numeric value exceptions > ---------------------------------------------- > > Key: ODATA-1032 > URL: https://issues.oasis-open.org/browse/ODATA-1032 > Project: OASIS Open Data Protocol (OData) TC > Issue Type: Bug > Components: OData URL Conventions > Affects Versions: V4.01_CSD01, V4.0_CSD03 > Reporter: Michael Pizzo > Fix For: V4.01_CSD02 > > > 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 -- This message was sent by Atlassian JIRA (v6.2.2#6258)
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]