-
Notifications
You must be signed in to change notification settings - Fork 240
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement Math.round using floor on GPU (#10092)
Fixes #10017 Spark and libcudf `round` round half away from zero, i.e. half up for positive numbers round(1.5)=2 and half down for negative round(-1.5)=-2 . `Math.round` rounds half up towards positive infinity regardless of the sign: round(1.5)=2.0, round(-1.5)=-1.0 Reimplementing Math.round from Orc TimestampFromDouble conversion using floor ``` Math.round(x) = n iff x is in [n-0.5, n+0.5) iff x+0.5 is in [n,n+1) iff floor(x+0.5) = n ``` Signed-off-by: Gera Shegalov <[email protected]>
- Loading branch information
1 parent
c38ef2d
commit 9a4ccb4
Showing
2 changed files
with
25 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters