To: J3 J3/19-145r2
From: Lorri Menard
Subject: Degree trigonometric functions
Date: 2019-February-22
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.
Result Characteristics: Same as X.
Result Value: The result has a value equal to a processor-dependent
approximation to arccos(X). The result is expressed in degrees
and lies in the range of 0 to 180.
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.
Result Characteristics: Same as X.
Result Value: The result has a value equal to a processor-dependent
approximation to arcsin(X). The result 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.
Result Characteristics: Same as X.
Result Value: The result has a value equal to a processor-dependent
approximation to cos(X). The result is expressed in degrees.
SIND (X)
Description: Sine function in degrees.
Class: Elemental function.
Argument: X shall be of type real.
Result Characteristics: Same as X.
Result Value: The result has a value equal to a processor-dependent
approximation to sin(X). The result is expressed in degrees.
TAND (X)
Description: Tangent function in degrees.
Class: Elemental function.
Argument: X shall be of type real.
Result Characteristics: Same as X.
Result Value: The result has a value equal to a processor-dependent
approximation to tan(X). The result is expressed in degrees.
4 Edits
To be supplied later