This documentation is archived and is not being maintained.


Visual Studio 2010

Visual Studio 2010 SP1 is required.

Microsoft Specific

Generates the XOP YMM instruction vfrczpd to extract the fractional part of the two double-precision floating-point values in its source.

__m256d _mm256_frcz_pd (
   __m256d src

[in] src

A 256-bit parameter that contains four 64-bit floating-point values.

A 256-bit result r that contains four 64-bit floating-point values.

r[i] := fractional_part_of(src[i]);





Header file <intrin.h>

The fractional portion of each of the four 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.

#include <stdio.h>
#include <intrin.h>
    __m256d a, d;
    int i;
    a.m256d_f64[0] = 1.125;
    a.m256d_f64[1] = -17.875;
    a.m256d_f64[2] = -1.125;
    a.m256d_f64[3] = 17.875;
    d = _mm256_frcz_pd(a);
    printf(" %.3lf %.3lf %.3lf %.3lf\n", d.m256d_f64[0],
        d.m256d_f64[1], d.m256d_f64[2], d.m256d_f64[3]);
0.125 -0.875 -0.125 0.875