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

Allow exponential notation for Edm.Decimal

    XMLWordPrintable

    Details

    • Proposal:
      Hide

      Allow exponential notation for Edm.Decimal literals.

      Add new symbolic value Scale="floating" for DECFLOAT values. The Precision attribute will specify the number of digits in the mantissa.

      Services would only allow scale="floating" for 4.01 and later versions of metadata,

      For 4.01 JSON payloads, exponential decimals is always assumed and format parameter is not needed or used.

      Show
      Allow exponential notation for Edm.Decimal literals. Add new symbolic value Scale="floating" for DECFLOAT values. The Precision attribute will specify the number of digits in the mantissa. Services would only allow scale="floating" for 4.01 and later versions of metadata, For 4.01 JSON payloads, exponential decimals is always assumed and format parameter is not needed or used.
    • Resolution:
      Show
      https://tools.oasis-open.org/version-control/browse/wsvn/odata/trunk/4.01%20spec/schemas/edm.xsd?op=diff&rev=941

      Description

      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.

        Attachments

          Activity

            People

            • Assignee:
              handl Ralf Handl
              Reporter:
              handl Ralf Handl
            • Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: