hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Hanson (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HIVE-6243) error in high-precision division for Decimal128
Date Tue, 21 Jan 2014 01:44:20 GMT

     [ https://issues.apache.org/jira/browse/HIVE-6243?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Eric Hanson updated HIVE-6243:
------------------------------

    Attachment: divide-error.01.patch

Run TestDecimal128.testKnownPriorErrors() to exhibit the bug.

Stepping through the code shows that a * b gives the correct value, but then dividing that
by a again does not give the expected result. So, the bug is in the division method divideDestructive();

> error in high-precision division for Decimal128
> -----------------------------------------------
>
>                 Key: HIVE-6243
>                 URL: https://issues.apache.org/jira/browse/HIVE-6243
>             Project: Hive
>          Issue Type: Sub-task
>            Reporter: Eric Hanson
>         Attachments: divide-error.01.patch
>
>
> a = 213474114411690
> b = 5062120663
> a * b = 1080631725579042037750470
> (a * b) / b ==> 
>   actual:   251599050984618
>   expected: 213474114411690



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message