[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: [OASIS Issue Tracker] (ODATA-784) Need to specify the behaviour of arithmetic operators on Decimal type
[ https://issues.oasis-open.org/browse/ODATA-784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61540#comment-61540 ] Mark Biamonte commented on ODATA-784: ------------------------------------- I created a table with 6 columns in several different databases and one SaaS application. The columns are defined as follows. COLA is Decimal (5,2) COLB is Decimal (10,4) XADD is COLA+COLB XSUB is COLA-COLB XMULT is COLA*COLB XDIV is COLA/COLB I populated COLA and COLB with the values 123.45 and 123456.7891 respectively and then fetched the data from all of the columns against the different databases and SaaS application. For the most part the results for all of the columns except XDIV were consistent. The results for XDIV were all over the place with regards to the scale of the result. Here are the results Database COLA COLB XADD XSUB XMULT XDIV Oracle 123.45 123456.7891 123580.2391 -123333.3391 15240740.614395 0.00099994500828954411872032074419145896 SQL Server 123.45 123456.7891 123580.2391 -123333.3391 15240740.614395 0.0009999450082 DB2 123.45 123456.7891 123580.2391 -123333.3391 15240740.614395 0.000999945008289544118720 MySQL 123.45 123456.7891 123580.2391 -123333.3391 15240740.614395 0.001000 PostgreSQL 123.45 123456.7891 0.00099994500828 Sybase 123.45 123456.7891 123580.2391 -123333.3391 15240740.614395 0.0009999450082 Informix 123.45 123456.7891 123580.2391 -123333.3391 15240740.614395 0.00099994500828954 Progress OpenEdge 123.45 123456.7891 123580.2391 -123333.3391 15240740.614395 0.00099995 Salesforce 123.45 123456.7891 123580.2391 -123333.3391 1.5240740614395E7 9.99945008289544E-4 > Need to specify the behaviour of arithmetic operators on Decimal type > --------------------------------------------------------------------- > > Key: ODATA-784 > URL: https://issues.oasis-open.org/browse/ODATA-784 > Project: OASIS Open Data Protocol (OData) TC > Issue Type: Improvement > Components: OData URL Conventions > Affects Versions: V4.0_OS > Environment: Proposed > Reporter: Evan Ireland > Priority: Minor > Fix For: V4.01_WD01, V4.0_ERRATA03 > > > The rules for scale of results of decimal arithmetic operators are not specified. -- 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]