From 2b21a7d3a41b4ddbeea4729cee706fd19f75ad0f Mon Sep 17 00:00:00 2001 From: Aaron Meurer Date: Thu, 12 Aug 2021 17:16:34 -0600 Subject: [PATCH] Fix the logaddexp special cases As previously written, they would fail in the test suite because of ambiguity about the value of logaddexp(nan, inf). --- spec/API_specification/elementwise_functions.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/spec/API_specification/elementwise_functions.md b/spec/API_specification/elementwise_functions.md index 01a7a35d9..97c77c6bc 100644 --- a/spec/API_specification/elementwise_functions.md +++ b/spec/API_specification/elementwise_functions.md @@ -944,8 +944,9 @@ each element `x1_i` of the input array `x1` with the respective element `x2_i` o For floating-point operands, -- If either `x1_i` or `x2_i` is `NaN`, the result is `NaN`. -- If either `x1_i` or `x2_i` is `+infinity`, the result is `+infinity`. +- If either `x1_i` or `x2_i` is `NaN`, the result is `NaN`. +- If `x1_i` is `+infinity` and `x2_i` is not `NaN`, the result is `+infinity`. +- If `x1_i` is not `NaN` and `x2_i` is `+infinity`, the result is `+infinity`. #### Parameters