_mm_frcz_pd
Visual Studio 2010 SP1 is required.
Microsoft Specific
Generates the XOP XMM instruction vfrczpd to extract the fractional part of the two double-precision floating-point values in its source.
__m128d _mm_frcz_pd (
__m128d src
);
Parameters
- [in] src
A 128-bit parameter that contains two 64-bit floating-point values.
Return value
A 128-bit result r that contains two 64-bit floating-point values.
r[i] := fractional_part_of(src[i]);
Requirements
Intrinsic |
Architecture |
---|---|
_mm_frcz_pd |
XOP |
Header file <intrin.h>
Remarks
The fractional portion of each of the two double-precision floating-point values in src is extracted and stored as the corresponding value in the destination. The sign of each result is the sign of its source value.
The vfrczpd instruction is part of the XOP family of instructions. Before you use this intrinsic, you must ensure that the processor supports this instruction. To determine hardware support for this instruction, call the __cpuid intrinsic with InfoType = 0x80000001 and check bit 11 of CPUInfo[2] (ECX). This bit is 1 when the instruction is supported, and 0 otherwise.
Example
#include <stdio.h>
#include <intrin.h>
main()
{
__m128d a, d;
int i;
a.m128d_f64[0] = 1.125;
a.m128d_f64[1] = -17.875;
d = _mm_frcz_pd(a);
printf(" %.3lf %.3lf\n", d.m128d_f64[0], d.m128d_f64[1]);
}
0.125 -0.875