You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Alexander Pivovarov (JIRA)" <ji...@apache.org> on 2015/06/26 04:22:04 UTC

[jira] [Updated] (HIVE-11103) Add banker's rounding BROUND UDF

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

Alexander Pivovarov updated HIVE-11103:
---------------------------------------
    Attachment: HIVE-11103.1.patch

patch #1

> Add banker's rounding BROUND UDF
> --------------------------------
>
>                 Key: HIVE-11103
>                 URL: https://issues.apache.org/jira/browse/HIVE-11103
>             Project: Hive
>          Issue Type: New Feature
>          Components: UDF
>            Reporter: Alexander Pivovarov
>            Assignee: Alexander Pivovarov
>         Attachments: HIVE-11103.1.patch
>
>
> Banker's rounding: the value is rounded to the nearest even number. Also known as "Gaussian rounding", and, in German, "mathematische Rundung".
> Example
> {code}
>                   2 digits                2 digits
> Unrounded    "Standard" rounding    "Gaussian" rounding
>   54.1754      54.18                  54.18
>  343.2050     343.21                 343.20
> +106.2038    +106.20                +106.20 
> =========    =======                =======
>  503.5842     503.59                 503.58
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)