Skip to content

Add note concerning division by zero for integer dtypes in floor_divide and remainder #311

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 1 commit into from
Nov 8, 2021
Merged
Show file tree
Hide file tree
Changes from all 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
8 changes: 8 additions & 0 deletions spec/API_specification/array_object.md
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,10 @@ Converts a zero-dimensional floating-point array to a Python `float` object.

Evaluates `self_i // other_i` for each element of an array instance with the respective element of the array `other`.

```{note}
For input arrays which promote to an integer data type, the result of division by zero is unspecified and thus implementation-defined.
```

#### Parameters

- **self**: _<array>_
Expand Down Expand Up @@ -886,6 +890,10 @@ The `matmul` function must implement the same semantics as the built-in `@` oper

Evaluates `self_i % other_i` for each element of an array instance with the respective element of the array `other`.

```{note}
For input arrays which promote to an integer data type, the result of division by zero is unspecified and thus implementation-defined.
```

#### Parameters

- **self**: _<array>_
Expand Down
8 changes: 8 additions & 0 deletions spec/API_specification/elementwise_functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -668,6 +668,10 @@ Rounds each element `x_i` of the input array `x` to the greatest (i.e., closest

Rounds the result of dividing each element `x1_i` of the input array `x1` by the respective element `x2_i` of the input array `x2` to the greatest (i.e., closest to `+infinity`) integer-value number that is not greater than the division result.

```{note}
For input arrays which promote to an integer data type, the result of division by zero is unspecified and thus implementation-defined.
```

#### Parameters

- **x1**: _<array>_
Expand Down Expand Up @@ -1213,6 +1217,10 @@ For floating-point operands,

Returns the remainder of division for each element `x1_i` of the input array `x1` and the respective element `x2_i` of the input array `x2`.

```{note}
For input arrays which promote to an integer data type, the result of division by zero is unspecified and thus implementation-defined.
```

#### Parameters

- **x1**: _<array>_
Expand Down