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

Ian Cook commented on ARROW-12861:
----------------------------------

[~edponce] I think sign(0.0) should return 0 regardless of the sign of the 
floating point zero, for two reasons: (a) This is what Python, R, all SQL 
engines, etc. do and therefore it is what users will expect. (b) There is 
little practical use in knowing the sign of a floating point zero value; this 
sign kernel will be more consistent and more useful in more ways if it always 
returns sign zero for value zero.

> [C++][Compute] Add sign function kernels
> ----------------------------------------
>
>                 Key: ARROW-12861
>                 URL: https://issues.apache.org/jira/browse/ARROW-12861
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: C++
>            Reporter: Eduardo Ponce
>            Assignee: Eduardo Ponce
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 5.0.0
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> Add the sign function to the compute kernels.
> sign(X) =
>  * 1 if X > 0
>  * 0 if X = 0
>  * -1 if X < 0



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

Reply via email to