Skip to content

Commit 3c52058

Browse files
authored
DOCSP-27221 $atan2 NaN/null fix (#2443)
1 parent 8b3514b commit 3c52058

File tree

1 file changed

+14
-13
lines changed
  • source/reference/operator/aggregation

1 file changed

+14
-13
lines changed

source/reference/operator/aggregation/atan2.txt

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,10 @@ Behavior
4545
``null`` and ``NaN``
4646
~~~~~~~~~~~~~~~~~~~~
4747

48-
If the first argument to :expression:`$atan2` is ``null``,
49-
:expression:`$atan2` returns ``null``. If the first argument to
50-
:expression:`$atan2` is ``NaN``, :expression:`$atan2` returns ``NaN``.
51-
If the first argument resolves to a number *and* the
52-
second argument resolves to either ``NaN`` or ``null``,
53-
:expression:`$atan2` returns the ``NaN`` or ``null`` respectively.
48+
If either argument given to ``$atan2`` is ``null``, the expression returns
49+
``null``. If either argument is ``NaN``, the expression returns ``NaN``.
50+
If one argument is ``null`` and the other is ``NaN``, the expression returns
51+
``null``.
5452

5553

5654
.. list-table::
@@ -61,21 +59,24 @@ second argument resolves to either ``NaN`` or ``null``,
6159
- Results
6260

6361
* - ``{ $atan2: [ NaN, <value> ] }``
62+
- ``NaN``
6463

65-
*or*
66-
67-
``{ $atan2: [ <value>, NaN ] }``
68-
64+
* - ``{ $atan2: [ <value>, NaN ] }``
6965
- ``NaN``
7066

7167
* - ``{ $atan2: [ null, <value> ] }``
72-
73-
*or*
68+
- ``null``
7469

75-
``{ $atan2: [ <value>, null ] }``
70+
* - ``{ $atan2: [ <value>, null ] }``
71+
- ``null``
7672

73+
* - ``{ $atan2: [ NaN, null ] }``
7774
- ``null``
7875

76+
* - ``{ $atan2: [ null, NaN ] }``
77+
- ``null``
78+
79+
7980
Example
8081
-------
8182

0 commit comments

Comments
 (0)