To: J3 J3/19-145r1
From: Lorri Menard
Subject: Degree trigonometric functions
Date: 2019-February-14
Reference: m215/18-139r1, m217/18-272r1
1 Introduction
Addition of the degree trigonometric functions was approved for further
work at m217. This paper attempts to craft specifications.
2 Specifications
These elemental intrinsics are generic and not specific.
All would be similar to their radian counterparts except that the
argument(s) or return values would be in degrees.
3 Syntax
ACOSD (X)
Description: Arccosine (inverse cosine) function in degrees.
Class: Elemental function.
Argument: X shall be of type real with a value that satisfies the
inequality |X| <= 1, or of type complex.
Result Characteristics: Same as X.
Result Value: The result has a value equal to a processor-dependent
approximation to arccos(X). If it is real it is expressed in degrees
and lies in the range -90 to 90. If it is complex the real part is
expressed in degrees and lies in the range -90 to 90.
ASIND (X)
Description: Arcsine (inverse sine) function in degrees.
Class: Elemental function.
Argument: X shall be of type real with a value that satisfies the
inequality |X| <= 1, or of type complex.
Result Characteristics: Same as X.
Result Value: The result has a value equal to a processor-dependent
approximation to arcsin(X). If it is real it is expressed in degrees
and lies in the range -90 to 90. If it is complex the real part is
expressed in degrees and lies in the range -90 to 90.
ATAND (X) or ATAND (Y,X)
Description: Arctangent (inverse tangent) function in degrees.
Class: Elemental function.
Arguments:
Y shall be of type real.
X If Y appears, X shall be of type real with the same kind type
parameter as Y. If Y has the value zero, X shall not have the
value zero. If Y does not appear, X shall be of type real.
Result Characteristics: Same as X
Result Value: If Y appears, the result is the same as the result of
ATAN2D (Y,X). If Y does not appear, the result has a value equal to a
processor-dependent approximation to arctan(X).
ATAN2D (Y,X)
Description: Arctangent (inverse tangent) function in degrees
Class: Elemental function.
Arguments:
Y shall be of type real.
X X shall be of the same type and kind type
parameter as Y. If Y has the value zero, X shall not have the
value zero.
Result Characteristics: Same as X
Result Value: The result has a value equal to a processor-dependent
approximation to arctan(Y/X) if X != 0. If Y > zero, the result is
positive. If Y < zero, the result is negative. If Y = zero, the
result is zero (if X > zero) or 180 degrees (if X < zero).
If X = zero, the absolute value of the result is 90.
COSD (X)
Description: Cosine function in degrees.
Class: Elemental function.
Argument: X shall be of type real or complex.
Result Characteristics: Same as X.
Result Value: The result has a value equal to a processor-dependent
approximation to cos(X). If X is of type real, it is regarded as a
value in degrees. If X is of type complex, its real part is regarded
as a value in degrees.
SIND (X)
Description: Sine function in degrees.
Class: Elemental function.
Argument: X shall be of type real or complex.
Result Characteristics: Same as X.
Result Value: The result has a value equal to a processor-dependent
approximation to sin(X). If X is of type real, it is regarded as a
value in degrees. If X is of type complex, its real part is regarded
as a value in degrees.
TAND (X)
Description: Tangent function in degrees.
Class: Elemental function.
Argument: X shall be of type real or complex.
Result Characteristics: Same as X.
Result Value: The result has a value equal to a processor-dependent
approximation to tan(X). If X is of type real, it is regarded as a
value in degrees. If X is of type complex, its real part is regarded
as a value in degrees.
4 Edits
To be supplied later