To: J3 J3/19-157r1 From: Lorri Menard Subject: IEEE Circular trigonometric functions Date: 2019-February-22 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. Result Characteristics: Same as X. Result Value: The result has a value equal to a processor-dependent approximation to arccos(X)/pi. It is expressed in half-revolutions and lies in the range of -1 to 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. Result Characteristics: Same as X. Result Value: The result has a value equal to a processor-dependent approximation to arcsin(X)/pi. It is expressed in half-revolutions and lies in the range of -1 to 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. Result Characteristics: Same as X. Result Value: The result has a value equal to a processor-dependent approximation to cos(X * pi). It is regarded as a value in half-revolutions. SINPI (X) Description: Circular sine function. 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 * pi). It is regarded as a value in half-revolutions. TANPI (X) Description: Circular tangent function. 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 * pi). It is regarded as a value in half-revolutions. 4 Edits To be supplied later