OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

odata message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: [OASIS Issue Tracker] (ODATA-771) Exponential notation for Edm.Decimal values in JSON payloads


     [ https://issues.oasis-open.org/browse/ODATA-771?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ralf Handl updated ODATA-771:
-----------------------------

              Summary: Exponential notation for Edm.Decimal values in JSON payloads  (was: Allow exponential notation for Edm.Decimal)
        Fix Version/s: V4.0_ERRATA03
                           (was: V4.1_WD01)
    Affects Version/s: V4.0_ERRATA02
                           (was: V4.0_CSD03)
          Description: 
IEEE754 defines the DECFLOAT data type for high-precision decimal arithmetic. They have 16 or 34 decimal digit mantissas and exponents between -383 and +384 or -6143 and +6144.

The correct, lossless representation of DECFLOAT values is an Edm.Decimal with unspecified precision and variable scale.

The OData JSON Format represents Edm.Decimal values as JSON numbers, and JSON numbers allow exponential notation, so 

"VeryLittle":1.4e-6143

should be valid in JSON payloads.

  was:
IEEE754 also defines the DECFLOAT data type for high-precision decimal arithmetic. They have 16 or 34 decimal digit mantissas and exponents between -383 and +384 or -6143 and +6144.

Representing them exactly in current Edm.Decimal would result in at most 34 non-zero digits and several thousand zeroes. This waste can easily be avoided by allowing exponential notation also for Edm.Decimal.

             Proposal: Confirm that exponential notation for Edm.Decimal is valid in JSON payloads  (was: Allow exponential notation for Edm.Decimal literals.

Add new symbolic value Scale="float" for DECFLOAT values. The Precision attribute will specify the number of digits in the mantissa.)
          Component/s:     (was: OData Protocol)
                           (was: OData CSDL)
                           (was: OData ABNF Construction Rules)
                           (was: OData URL Conventions)
                           (was: OData ATOM Format)

> Exponential notation for Edm.Decimal values in JSON payloads
> ------------------------------------------------------------
>
>                 Key: ODATA-771
>                 URL: https://issues.oasis-open.org/browse/ODATA-771
>             Project: OASIS Open Data Protocol (OData) TC
>          Issue Type: Improvement
>          Components: OData JSON Format
>    Affects Versions: V4.0_ERRATA02
>         Environment: [Proposed]
>            Reporter: Ralf Handl
>             Fix For: V4.0_ERRATA03
>
>
> IEEE754 defines the DECFLOAT data type for high-precision decimal arithmetic. They have 16 or 34 decimal digit mantissas and exponents between -383 and +384 or -6143 and +6144.
> The correct, lossless representation of DECFLOAT values is an Edm.Decimal with unspecified precision and variable scale.
> The OData JSON Format represents Edm.Decimal values as JSON numbers, and JSON numbers allow exponential notation, so 
> "VeryLittle":1.4e-6143
> should be valid in JSON payloads.



--
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]