Function

vDSP_vfrac

Truncates the elements of a single-precision vector to fractions.

Declaration

void vDSP_vfrac(const float *__A, vDSP_Stride __IA, float *__C, vDSP_Stride __IC, vDSP_Length __N);

Parameters

__A

Single-precision real input vector

__IA

Stride for A

__C

Single-precision real output vector

__IC

Stride for C

__N

The number of elements to process

Discussion

Performs the following operation:

mathematical formula

The "function" truncate(x) is the integer farthest from 0 but not farther than x. Thus, for example, vDSP_vFrac(-3.25) produces the result -0.25.

Sets each element of vector C to the signed fractional part of the corresponding element of A.

See Also

Single-Vector Fractional Part Extraction

vDSP_vfracD

Truncates the elements of a double-precision vector to fractions.