[flang-commits] [flang] [flang] Fix for atand(Y, X), and implment atan2d(Y, X) (PR #79002)

Yi Wu via flang-commits flang-commits at lists.llvm.org
Mon Jan 22 08:14:49 PST 2024


yi-wu-arm wrote:

Standard for `atand`:
```
16.9.25 ATAND (X) or ATAND (Y, X)
1 Description. Arc tangent function in degrees.
2 Class. Elemental function.
3 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.
4 Result Characteristics. Same as X.
5 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 the arc tangent of X; it is expressed in
   degrees and lies in the range −90 ≤ ATAND (X) ≤ 90.
6 Example. ATAND (1.0) has the value 45.0 (approximately).
```
Standard for `atan2d`:
```text
16.9.23 ATAN2D (Y, X)
1 Description. Arc tangent function in degrees.
2 Class. Elemental function.
3 Arguments.
  Y shall be of type real.
  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.
4 Result Characteristics. Same as X.
5 Result Value. The result is expressed in degrees and lies in the range −180 ≤ ATAN2D (Y, X) ≤ 180. It has
   a value equal to a processor-dependent approximation to ATAN2 (Y, X)×180/π.
6 Examples. ATAN2D (1.0, 1.0) has the value 45.0 (approximately)...
```

https://github.com/llvm/llvm-project/pull/79002


More information about the flang-commits mailing list