[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: [OASIS Issue Tracker] (ODATA-801) Consider supporting negative scale for decimal type
[ https://issues.oasis-open.org/browse/ODATA-801?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=59503#comment-59503 ] Michael Pizzo commented on ODATA-801: ------------------------------------- I would be fine relaxing decimal to allow negative scale in a full release of the spec, but I know of existing clients that will break if they get negative values for scale. Progresses solution of adding absolute value of scale to reported Precision seems a good, compatible solution for an errata. > Consider supporting negative scale for decimal type > --------------------------------------------------- > > Key: ODATA-801 > URL: https://issues.oasis-open.org/browse/ODATA-801 > Project: OASIS Open Data Protocol (OData) TC > Issue Type: Improvement > Components: OData CSDL > Affects Versions: V4.0_OS > Reporter: Evan Ireland > Fix For: V4.0_ERRATA03 > > > (Relates to ODATA-771) > ODATA-789 attempted to address a number of questions around the use of Edm.Decimal. Part of that was clarifying/correcting current semantics of Edm.Decimal, and was accepted at part of ODATA-789. Part of the issue discussed the addition of an exponential notation, which was already the topic of ODATA-771 and will be tracked there. > This issue tracks the remaining issue from ODATA-789, the proposal to expand Edm.Decimal to support negative scale. > Decimal data types in programming languages and databases > =============================================== > Common terminology is > Value = Mantissa * 10**(-Scale) > Precision = length of Mantissa > Positive Scale means fractional digits, negative scale avoids representing "trailing zeroes" for large integers, e.g. one million has mantissa = 1, scale = -6 > Type Precision = length of mantissa Scale = -Exponent > -------------------------------------------------------------------------------------------------------------------- > C# decimal 96 bit ~ 28-29 decimal digits Instance, 0...28 > Objective-C NSDecimalNumber 38 decimal digits Instance, -128...127 > Java BigDecimal unlimited no of decimal digits Instance, -2,147,483,648...2,147,483,647 (32 bit) > DECFLOAT34 34 decimal digits Instance, -384...383 > DECFLOAT16 16 decimal digits Instance, -6144...6143 > DB2 DECIMAL 1...31 decimal digits Column, 0...Precision > Sybase ASE DECIMAL 1...38 decimal digits Column, 0...Precision > Sybase IQ DECIMAL 1...126 decimal digits Column, 0...Precision > Postgres DECIMAL 1...1000 decimal digits Column, 0...Precision > Oracle NUMBER 1...38 decimal digits Column, -84...127 > Problem when mapping NUMBER to Edm.Decimal > - Scale cannot be negative or larger than Precision -- 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]