Intel® C++ Compiler Classic Developer Guide and Reference

ID 767249
Date 3/31/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

_mm_atan2_ps, _mm256_atan2_ps

Calculates the inverse tangent of float32 variables x and y. Vector variant of atan2(x, y) function for a 128-bit/256-bit vector argument of float32 values.

Syntax

extern __m128 _mm_atan2_ps(__m128 v1, __m128 v2);

extern __m256 _mm256_atan2_ps(__m256 v1, __m256 v2);

Arguments

v1

vector with float32 values

v2

vector with float32 values

Description

Calculates the arc tangent of corresponding float32 elements of vectors v1 and v2. The following is an illustration of the atan2 operation:

Res[0]  = atan2(v1[0], v2[0])
Res[1]  = atan2(v1[1], v2[1])
Res[2]  = atan2(v1[2], v2[2])
Res[15] = atan2(v1[15], v2[15])
...

NOTE:

This calculation is similar to calculating the arc tangent of y / x, except that the signs of both arguments are used to determine the quadrant of the result.

Returns

128-bit/256-bit vector with the result of the operation.

NOTE:

Many routines in the Short Vector Math Library (SVML) are more optimized for Intel® microprocessors than for non-Intel microprocessors.