svml128_atan2_f?
Compute the arctangent of the input. The input src1 and src2 are vectors.
Interface Definition
C interface:
float32x4_t svml128_atan2_f32(float32x4_t src1, float32x4_t src2);
float64x2_t svml128_atan2_f64(float64x2_t src1, float64x2_t src2);
Parameters
Parameter |
Type |
Description |
Input/Output |
|---|---|---|---|
src1 |
|
Floating-point value of the input vector |
Input |
src2 |
|
Floating-point value of the input vector |
Input |
Return Value
For atan2(y, x):
- An azimuth from the origin to the point (x, y) is returned, that is, the included angle with reference to the x-axis. The unit of the return value is radian, and the value range is (-π, +π].
- If y is ±0 and x is negative or -0, the return value is ±π.
- If y is ±0 and x is positive or +0, the return value is ±0.
- If y is ±∞ and x is a finite number, the return value is ±π/2.
- If y is ±∞ and x is –∞, the return value is ±3π/4.
- If y is ±∞ and x is +∞, the return value is ±π/4.
- If x is ±0 and y is negative, the return value is -π/2.
- If x is ±0 and y is positive, the return value is +π/2.
- If x is -∞ and y is finite positive, the return value is +π.
- If x is -∞ and y is finite negative, the return value is -π.
- If x is +∞ and y is finite positive, the return value is +0.
- If x is +∞ and y is finite negative, the return value is -0.
- If x or y is NaN, the return value is NaN.
Dependencies
C: "ksvml.h"
Examples
C interface:
float32x4_t src = {0.0f, 2.0f, INFINITY, NAN};
float32x4_t src2 = {0.0f, 2.0f, INFINITY, NAN};
float32x4_t dst = svml128_atan2_f32(src, src2);
printf("%.15g %.15g %.15g %.15g\n", dst[0], dst[1], dst[2], dst[3]);
/**
* Output dst:
* 0 0.785398163397448 0.785398163397448 -nan
*/
Parent topic: Function Syntax