From 0e2a4010b3c5e83e42bb737a5ba92def698c3bf2 Mon Sep 17 00:00:00 2001 From: Aaron Meurer Date: Wed, 1 Sep 2021 15:13:34 -0600 Subject: [PATCH 1/6] Indicate that abs() of the minimum integer value for signed dtypes is undefined --- spec/API_specification/elementwise_functions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/API_specification/elementwise_functions.md b/spec/API_specification/elementwise_functions.md index 97c77c6bc..1d51ba351 100644 --- a/spec/API_specification/elementwise_functions.md +++ b/spec/API_specification/elementwise_functions.md @@ -22,7 +22,7 @@ A conforming implementation of the array API standard must provide and support t (function-abs)= ### abs(x, /) -Calculates the absolute value for each element `x_i` of the input array `x` (i.e., the element-wise result has the same magnitude as the respective element in `x` but has positive sign). +Calculates the absolute value for each element `x_i` of the input array `x` (i.e., the element-wise result has the same magnitude as the respective element in `x` but has positive sign). For signed integer data types, the `abs` of smallest representable integer is implementation-defined. #### Special Cases From f7c8d343ee9ed62b694f49f8b724ff6f0a13805e Mon Sep 17 00:00:00 2001 From: Aaron Meurer Date: Fri, 3 Sep 2021 14:56:32 -0600 Subject: [PATCH 2/6] Move the abs(smallest signed integer) text into a note --- spec/API_specification/elementwise_functions.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/spec/API_specification/elementwise_functions.md b/spec/API_specification/elementwise_functions.md index 1d51ba351..129183440 100644 --- a/spec/API_specification/elementwise_functions.md +++ b/spec/API_specification/elementwise_functions.md @@ -22,7 +22,12 @@ A conforming implementation of the array API standard must provide and support t (function-abs)= ### abs(x, /) -Calculates the absolute value for each element `x_i` of the input array `x` (i.e., the element-wise result has the same magnitude as the respective element in `x` but has positive sign). For signed integer data types, the `abs` of smallest representable integer is implementation-defined. +Calculates the absolute value for each element `x_i` of the input array `x` (i.e., the element-wise result has the same magnitude as the respective element in `x` but has positive sign). + +```{note} + +For signed integer data types, the `abs` of smallest representable integer is implementation-dependent. +``` #### Special Cases From a0e4238fdac43886721e309a698101a2af3ef3f4 Mon Sep 17 00:00:00 2001 From: Athan Date: Mon, 20 Sep 2021 03:15:35 -0700 Subject: [PATCH 3/6] Update copy --- spec/API_specification/elementwise_functions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/API_specification/elementwise_functions.md b/spec/API_specification/elementwise_functions.md index 129183440..1eb7da10f 100644 --- a/spec/API_specification/elementwise_functions.md +++ b/spec/API_specification/elementwise_functions.md @@ -26,7 +26,7 @@ Calculates the absolute value for each element `x_i` of the input array `x` (i.e ```{note} -For signed integer data types, the `abs` of smallest representable integer is implementation-dependent. +For signed integer data types, the absolute value of smallest representable integer is implementation-dependent. ``` #### Special Cases From ec589143dc769bc016506048eb6b0323c72cb1aa Mon Sep 17 00:00:00 2001 From: Athan Date: Mon, 20 Sep 2021 03:15:55 -0700 Subject: [PATCH 4/6] Remove blank line --- spec/API_specification/elementwise_functions.md | 1 - 1 file changed, 1 deletion(-) diff --git a/spec/API_specification/elementwise_functions.md b/spec/API_specification/elementwise_functions.md index 1eb7da10f..4cc6068d9 100644 --- a/spec/API_specification/elementwise_functions.md +++ b/spec/API_specification/elementwise_functions.md @@ -25,7 +25,6 @@ A conforming implementation of the array API standard must provide and support t Calculates the absolute value for each element `x_i` of the input array `x` (i.e., the element-wise result has the same magnitude as the respective element in `x` but has positive sign). ```{note} - For signed integer data types, the absolute value of smallest representable integer is implementation-dependent. ``` From f493f9da74ce1417d8a2c3f25df51cac3cc98885 Mon Sep 17 00:00:00 2001 From: Athan Date: Mon, 20 Sep 2021 03:17:37 -0700 Subject: [PATCH 5/6] Update copy "smallest" is ambiguous, as could mean `0` or the minimum value (e.g., `-128` for `int8`). --- spec/API_specification/elementwise_functions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/API_specification/elementwise_functions.md b/spec/API_specification/elementwise_functions.md index 4cc6068d9..69b600d41 100644 --- a/spec/API_specification/elementwise_functions.md +++ b/spec/API_specification/elementwise_functions.md @@ -25,7 +25,7 @@ A conforming implementation of the array API standard must provide and support t Calculates the absolute value for each element `x_i` of the input array `x` (i.e., the element-wise result has the same magnitude as the respective element in `x` but has positive sign). ```{note} -For signed integer data types, the absolute value of smallest representable integer is implementation-dependent. +For signed integer data types, the absolute value of minimum representable integer is implementation-dependent. ``` #### Special Cases From dbbc0db7feb976fd8d490b45fe6306a762e4b403 Mon Sep 17 00:00:00 2001 From: Athan Date: Mon, 20 Sep 2021 03:19:59 -0700 Subject: [PATCH 6/6] Fix missing article --- spec/API_specification/elementwise_functions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/API_specification/elementwise_functions.md b/spec/API_specification/elementwise_functions.md index 69b600d41..a799d76c5 100644 --- a/spec/API_specification/elementwise_functions.md +++ b/spec/API_specification/elementwise_functions.md @@ -25,7 +25,7 @@ A conforming implementation of the array API standard must provide and support t Calculates the absolute value for each element `x_i` of the input array `x` (i.e., the element-wise result has the same magnitude as the respective element in `x` but has positive sign). ```{note} -For signed integer data types, the absolute value of minimum representable integer is implementation-dependent. +For signed integer data types, the absolute value of the minimum representable integer is implementation-dependent. ``` #### Special Cases