Function cpf_atan2f
Defined in File cpfloat_binary32.h
Function Documentation
-
static inline int cpf_atan2f(float *X, const float *A, const float *B, const size_t numelem, optstruct *fpopts)
Compute 2-argument arctangent in lower precision.
If the function executes without errors, then \( X_i = \mathrm{atan} (B_i / A_i) \) rounded to a lower-precision target format. The parameters of the target format and the rounding mode to be used are encoded in
fpopts
. If required, the function flips one bit in some of the entries ofX
.If OpenMP support is specified at compile time, several OpenMP threads are used if
numelem
is large enough. This parameter is machine dependent.- Parameters:
X – [out] Array of rounded values.
A – [in] Input array.
B – [in] Input array.
numelem – [in] Number of elements in
X
,A
, andB
.fpopts – [in] Parameters describing the target format, the rounding mode, and the probability of soft errors striking the rounded values.
- Returns:
The function returns 1 if
fpopts->precision
is larger than 24 , 2 iffptops->emin
is smaller than -126 or fpopts->emax is larger than 127 , and 0 otherwise.