[ 
https://issues.apache.org/jira/browse/ARROW-12744?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17346417#comment-17346417
 ] 

Ben Kietzman commented on ARROW-12744:
--------------------------------------

1. IMHO, compute kernels should not rely on (or be affected in any way by) the 
floating point environment. Users may have a need to adjust this for their own 
applications and arrow's kernels should produce correct output regardless

2. Output should be of the same floating point type as the input since the 
extent of rounding is configurable (probably via a function option like 
{{RoundOptions::ndigits}}) whereas integral output is only well formed if we're 
rounding to the nearest one.

> [C++][Compute] Add rounding kernel
> ----------------------------------
>
>                 Key: ARROW-12744
>                 URL: https://issues.apache.org/jira/browse/ARROW-12744
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: C++
>            Reporter: Ian Cook
>            Assignee: Eduardo Ponce
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Kernel to round an array of floating point numbers. Should return an array of 
> the same type as the input. Should have an option to control how many digits 
> after the decimal point (default value 0 meaning round to the nearest 
> integer).
> Midpoint values (e.g. 0.5 rounded to nearest integer) should round away from 
> zero (up for positive numbers, down for negative numbers).



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to