J3/15-108
To: J3
Subject: Wart removal proposal -- ATAN2 and SIGN functions
From: Van Snyder
Date: 2014 December 29
Reference: 15-007
1. Introduction
===============
There is no problem in determining the kind of the result of the
quotient of two real numbers with different kinds, or the value if
overflow does not occur. DOT_PRODUCT and MATMUL allow different kinds
of arguments. The descriptions (and the description in 7.1.9.3) are
silent concerning radix. There should therefore not be a problem with
ATAN2 having arguments of different kinds and radices.
In the SIGN function, the only interesting part of the value of the
second argument is its sign. It therefore doesn't seem necessary that
the arguments are required to have the same kind. Indeed, the second
argument could be either real or integer, and of any kind.
2. Proposal
===========
Continue to require the arguments of ATAN2 and SIGN to have the same
type, but do not require that they have the same kind.
3. Draft Edits
==============
[Introduction, under "Intrinsic Functions"] Insert list item
"-- The B argument to the SIGN function is not required to be of the
same type or kind as the A argument.
-- The X argument to the ATAN2 function is not required to be of the
same kind as the Y argument.
"
[337:2-3 13.7.16p3] Replace the first sentence with "If Y does not appear,
X shall be of type real or complex. If Y appears X shall be of type
real". Delete the third sentence (which has been moved to be the first
sentence).
[337:4 13.7.17p4] After "X" insert "if Y does not appear. Otherwise,
the same as the result of ATAN2(Y,X)".
[337:14 13.7.18p3] Replace "shall be ... Y" with "shall be of type real".
[337:16 13.7.18p4] Replace "Same as X" with "The kind type parameter of
the result is that of the expression Y/X determined by the kind type
parameters of the arguments according to 7.1.9.3".
{Compare to 13.7.49p4 ( DOT_PRODUCT).}
[396:15 13.7.158p3] Replace "the same ... A" with "type integer or
real".