Skip to content

Specify rounding mode as half to even #93

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 23, 2020
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion spec/API_specification/elementwise_functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -1136,10 +1136,15 @@ Returns the remainder of division for each element `x1_i` of the input array `x1

Rounds each element `x_i` of the input array `x` to the nearest integer-valued number.

```{note}

The default rounding mode must be round half to even (i.e., rounding ties to the nearest even integer).
```

#### Special Cases

- If `x_i` is already integer-valued, the result is `x_i`.
- If two integers are equally close to `x_i`, the result is whichever integer is farthest from `0`.
- If two integers are equally close to `x_i`, the result is the even integer closest to `x_i`.

#### Parameters

Expand Down