To: J3 J3/19-157
From: Lorri Menard
Subject: IEEE Circular trigonometric functions
Date: 2019-February-14
Reference: m215/18-139r1, m217/18-276r1
1 Introduction
Addition of the circular 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 half-revolutions.
3 Syntax
ACOSPI (X)
Description: Inverse circular cosine function.
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)/pi. If it is real it is expressed in
half-revolutions and lies in the range [-1,+1]. If it is complex the
real part is expressed in half-revolutions and lies in the
range [-1,+1].
ASINPI (X)
Description: Inverse circular sine function.
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)/pi. If it is real it is expressed in
half-revolutions and lies in the range [-1,+1]. If it is complex the
real part is expressed in half-revolutions and lies in the
range [-1,+1].
ATANPI (X) or ATANPI (Y,X)
Description: Inverse circular tangent function.
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
ATAN2PI (Y,X). If Y does not appear, the result has a value equal to a
processor-dependent approximation to arctan(X)/pi.
ATAN2PI (Y,X)
Description: Inverse circular tangent function.
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)/pi 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 1 (if X < zero).
If X = zero, the result is zero. If X is minus zero the result is
one.
COSPI (X)
Description: Circular cosine function.
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 * pi). If X is of type real, it is regarded as a
value in half-revolutions. If X is of type complex, its real part is
regarded as a value in half-revolutions.
SINPI (X)
Description: Circular sine function.
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 * pi). If X is of type real, it is regarded as a
value in half-revolutions. If X is of type complex, its real part is
regarded as a value in half-revolutions.
TANPI (X)
Description: Circular tangent function.
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 * pi). If X is of type real, it is regarded as a
value in half-revolutions. If X is of type complex, its real part is
regarded as a value in half-revolutions.
4 Edits
To be supplied later