# Intrinsics for Reciprocal Operations (512-bit)

The prototypes for Intel® Advanced Vector Extensions 512 (Intel® AVX-512) intrinsics are located in the zmmintrin.h header file.
To use these intrinsics, include the immintrin.h file as follows:

    #include <immintrin.h>

Intrinsic Name | Operation | Corresponding Intel® AVX-512 Instruction
--- | --- | ---
`_mm512_rcp14_pd`, `_mm512_mask_rcp14_pd`, `_mm512_maskz_rcp14_pd` | Computes the approximate reciprocal of packed float64 elements. | `VRCP14PD`
`_mm512_rcp14_ps`, `_mm512_mask_rcp14_ps`, `_mm512_maskz_rcp14_ps` | Computes the approximate reciprocal of packed float32 elements. | `VRCP14PS`
`_mm_rcp14_sd`, `_mm_mask_rcp14_sd`, `_mm_maskz_rcp14_sd` | Computes the approximate reciprocal of scalar float64 elements. | `VRCP14SD`
`_mm_rcp14_ss`, `_mm_mask_rcp14_ss`, `_mm_maskz_rcp14_ss` | Computes the approximate reciprocal of scalar float32 elements. | `VRCP14SS`
`_mm512_rcp28_pd`, `_mm512_mask_rcp28_pd`, `_mm512_maskz_rcp28_pd` `_mm512_rcp28_round_pd`, `_mm512_mask_rcp28_round_pd`, `_mm512_maskz_rcp28_round_pd` | Computes the approximate reciprocal of packed float64 elements with bounded relative error. | `VRCP28PD`
`_mm_rcp28_sd`, `_mm_mask_rcp28_sd`, `_mm_maskz_rcp28_sd` `_mm_rcp28_round_sd`, `_mm_mask_rcp28_round_sd`, `_mm_maskz_rcp28_round_sd` | Computes the approximate reciprocal of scalar float64 elements with bounded relative error. | `VRCP28SD`
`_mm512_rcp28_ps`, `_mm512_mask_rcp28_ps`, `_mm512_maskz_rcp28_ps` `_mm512_rcp28_round_ps`, `_mm512_mask_rcp28_round_ps`, `_mm512_maskz_rcp28_round_ps` | Computes the approximate reciprocal of packed float32 elements with bounded relative error. | `VRCP28PS`
`_mm_rcp28_ss`, `_mm_mask_rcp28_ss`, `_mm_maskz_rcp28_ss` `_mm_rcp28_round_ss`, `_mm_mask_rcp28_round_ss`, `_mm_maskz_rcp28_round_ss` | Computes the approximate reciprocal of scalar float32 elements with bounded relative error. | `VRCP28SS`
`_mm512_recip_pd`, `_mm512_mask_recip_pd` | Computes the approximate reciprocal of packed float64 elements. | None.
`_mm512_recip_ps`, `_mm512_mask_recip_ps` | Computes the approximate reciprocal of packed float32 elements. | None.

variable | definition
--- | ---
k | writemask used as a selector
a | first source vector element
b | second source vector element
src | source element to use based on writemask result

_mm512_rcp14_pd

    extern __m512d __cdecl _mm512_rcp14_pd(__m512d a);

Computes the approximate reciprocal of packed float64 elements in a, and stores the result.

### Note

The maximum relative error for this approximation is less than 2(-14).

_mm512_mask_rcp14_pd

    extern __m512d __cdecl _mm512_mask_rcp14_pd(__m512d src, __mmask8 k, __m512d a);

Computes the approximate reciprocal of packed float64 elements in a, and stores the result using writemask k (elements are copied from src when the corresponding mask bit is not set).

### Note

The maximum relative error for this approximation is less than 2(-14).

_mm512_maskz_rcp14_pd

    extern __m512d __cdecl _mm512_maskz_rcp14_pd(__mmask8 k, __m512d a);

Computes the approximate reciprocal of packed float64 elements in a, and stores the result using zeromask k (elements are zeroed out when the corresponding mask bit is not set).

### Note

The maximum relative error for this approximation is less than 2(-14).

_mm512_rcp14_ps

    extern __m512 __cdecl _mm512_rcp14_ps(__m512 a);

Computes the approximate reciprocal of packed float32 elements in a, and stores the result.

### Note

The maximum relative error for this approximation is less than 2(-14).

_mm512_mask_rcp14_ps

    extern __m512 __cdecl _mm512_mask_rcp14_ps(__m512 src, __mmask16 k, __m512 a);

Computes the approximate reciprocal of packed float32 elements in a, and stores the result using writemask k (elements are copied from src when the corresponding mask bit is not set).

### Note

The maximum relative error for this approximation is less than 2(-14).

_mm512_maskz_rcp14_ps

    extern __m512 __cdecl _mm512_maskz_rcp14_ps(__mmask16 k, __m512 a);

Computes the approximate reciprocal of packed float32 elements in a, and stores the result using zeromask k (elements are zeroed out when the corresponding mask bit is not set).

### Note

The maximum relative error for this approximation is less than 2(-14).

_mm_rcp14_sd

    extern __m128d __cdecl _mm_rcp14_sd(__m128d a, __m128d b);

Computes the approximate reciprocal of lower float64 element in b, stores the result in lower destination element, and copies upper element from a to upper destination element.

### Note

The maximum relative error for this approximation is less than 2(-14).

_mm_mask_rcp14_sd

    extern __m128d __cdecl _mm_mask_rcp14_sd(__m128d src, __mmask8 k, __m128d a, __m128d b);

Computes the approximate reciprocal of lower float64 element in b, stores the result in lower destination element using writemask k (the element is copied from src when mask bit 0 is not set), and copies upper element from a to upper destination element.

### Note

The maximum relative error for this approximation is less than 2(-14).

_mm_maskz_rcp14_sd

    extern __m128d __cdecl _mm_maskz_rcp14_sd(__mmask8 k, __m128d a, __m128d b);

Computes the approximate reciprocal of lower float64 element in b, stores the result in lower destination element using zeromask k (the element is zeroed out when mask bit 0 is not set), and copies upper element from a to upper destination element.

### Note

The maximum relative error for this approximation is less than 2(-14).

_mm_rcp14_ss

    extern __m128 __cdecl _mm_rcp14_ss(__m128 a, __m128 b);

Computes approximate reciprocal of lower float32 element in b, stores the result in lower destination element, and copies upper three packed elements from a to upper destination elements.

### Note

The maximum relative error for this approximation is less than 2(-14).

_mm_mask_rcp14_ss

    extern __m128 __cdecl _mm_mask_rcp14_ss(__m128 src, __mmask8 k, __m128 a, __m128 b);

Computes approximate reciprocal of lower float32 element in b, stores the result in lower destination element using writemask k (the element is copied from src when mask bit 0 is not set), and copies upper three packed elements from a to upper destination elements.

### Note

The maximum relative error for this approximation is less than 2(-14).

_mm_maskz_rcp14_ss

    extern __m128 __cdecl _mm_maskz_rcp14_ss(__mmask8 k, __m128 a, __m128 b);

Computes approximate reciprocal of lower float32 element in b, stores the result in lower destination element using zeromask k (the element is zeroed out when mask bit 0 is not set), and copies upper three packed elements from a to upper destination elements.

### Note

The maximum relative error for this approximation is less than 2(-14).

_mm512_rcp28_round_pd

    extern __m512d __cdecl _mm512_rcp28_round_pd(__m512d a);

Computes the approximate reciprocal of packed float64 elements in a, and stores the result.

### Note

The maximum relative error for this approximation is less than 2(-28).

_mm512_mask_rcp28_round_pd

    extern __m512d __cdecl _mm512_mask_rcp28_round_pd(__m512d src, __mmask8 k, __m512d a);

Computes the approximate reciprocal of packed float64 elements in a, and stores the result using writemask k (elements are copied from src when the corresponding mask bit is not set).

### Note

The maximum relative error for this approximation is less than 2(-28).

_mm512_maskz_rcp28_round_pd

    extern __m512d __cdecl _mm512_maskz_rcp28_round_pd(__mmask8 k, __m512d a);

Computes the approximate reciprocal of packed float64 elements in a, and stores the result using zeromask k (elements are zeroed out when the corresponding mask bit is not set).

### Note

The maximum relative error for this approximation is less than 2(-28).

_mm512_rcp28_pd

    extern __m512d __cdecl _mm512_rcp28_pd(__m512d a);

Computes the approximate reciprocal of packed float64 elements in a, and stores the result.

### Note

The maximum relative error for this approximation is less than 2(-28).

_mm512_mask_rcp28_pd

    extern __m512d __cdecl _mm512_mask_rcp28_pd(__m512d src, __mmask8 k, __m512d a);

Computes the approximate reciprocal of packed float64 elements in a, and stores the result using writemask k (elements are copied from src when the corresponding mask bit is not set).

### Note

The maximum relative error for this approximation is less than 2(-28).

_mm512_maskz_rcp28_pd

    extern __m512d __cdecl _mm512_maskz_rcp28_pd(__mmask8 k, __m512d a);

Computes the approximate reciprocal of packed float64 elements in a, and stores the result using zeromask k (elements are zeroed out when the corresponding mask bit is not set).

### Note

The maximum relative error for this approximation is less than 2(-28).

_mm512_rcp28_round_ps

    extern __m512 __cdecl _mm512_rcp28_round_ps(__m512 a);

Computes the approximate reciprocal of packed float32 elements in a, and stores the result.

### Note

The maximum relative error for this approximation is less than 2(-28).

_mm512_mask_rcp28_round_ps

    extern __m512 __cdecl _mm512_mask_rcp28_round_ps(__m512 src, __mmask16 k, __m512 a);

Computes the approximate reciprocal of packed float32 elements in a, and stores the result using writemask k (elements are copied from src when the corresponding mask bit is not set).

### Note

The maximum relative error for this approximation is less than 2(-28).

_mm512_maskz_rcp28_round_ps

    extern __m512 __cdecl _mm512_maskz_rcp28_round_ps(__mmask16 k, __m512 a);

Computes the approximate reciprocal of packed float32 elements in a, and stores the result using zeromask k (elements are zeroed out when the corresponding mask bit is not set).

### Note

The maximum relative error for this approximation is less than 2(-28).

_mm512_rcp28_ps

    extern __m512 __cdecl _mm512_rcp28_ps(__m512 a);

Computes the approximate reciprocal of packed float32 elements in a, and stores the result.

### Note

The maximum relative error for this approximation is less than 2(-28).

_mm512_mask_rcp28_ps

    extern __m512 __cdecl _mm512_mask_rcp28_ps(__m512 src, __mmask16 k, __m512 a);

Computes the approximate reciprocal of packed float32 elements in a, and stores the result using writemask k (elements are copied from src when the corresponding mask bit is not set).

### Note

The maximum relative error for this approximation is less than 2(-28).

_mm512_maskz_rcp28_ps

    extern __m512 __cdecl _mm512_maskz_rcp28_ps(__mmask16 k, __m512 a);

Computes the approximate reciprocal of packed float32 elements in a, and stores the result using zeromask k (elements are zeroed out when the corresponding mask bit is not set).

### Note

The maximum relative error for this approximation is less than 2(-28).

_mm512_rcp28_round_sd

    extern __m128d __cdecl _mm512_rcp28_round_sd(__m128d a, __m128d b);

Computes the approximate reciprocal of lower float64 element in b, stores the result in lower destination element, and copies upper element from a to upper destination element.

### Note

The maximum relative error for this approximation is less than 2(-28).

_mm512_mask_rcp28_round_sd

    extern __m128d __cdecl _mm512_mask_rcp28_round_sd(__m128d src, __mmask8 k, __m128d a, __m128d b);

Computes the approximate reciprocal of lower float64 element in b, stores the result in lower destination element using writemask k (the element is copied from src when mask bit 0 is not set), and copies upper element from a to upper destination element.

### Note

The maximum relative error for this approximation is less than 2(-28).

_mm512_maskz_rcp28_round_sd

    extern __m128d __cdecl _mm512_maskz_rcp28_round_sd(__mmask8 k, __m128d a, __m128d b);

Computes the approximate reciprocal of lower float64 element in b, stores the result in lower destination element using zeromask k (the element is zeroed out when mask bit 0 is not set), and copies upper element from a to upper destination element.

### Note

The maximum relative error for this approximation is less than 2(-28).

_mm512_rcp28_round_sd

    extern __m128d __cdecl _mm512_rcp28_round_sd(__m128d a, __m128d b);

Computes the approximate reciprocal of lower float64 element in b, stores the result in lower destination element, and copies upper element from a to upper destination element.

### Note

The maximum relative error for this approximation is less than 2(-28).

_mm512_mask_rcp28_round_sd

    extern __m128d __cdecl _mm512_mask_rcp28_round_sd(__m128d src, __mmask8 k, __m128d a, __m128d b);

Computes the approximate reciprocal of lower float64 element in b, stores the result in lower destination element using writemask k (the element is copied from src when mask bit 0 is not set), and copies upper element from a to upper destination element.

### Note

The maximum relative error for this approximation is less than 2(-28).

_mm512_maskz_rcp28_round_sd

    extern __m128d __cdecl _mm512_maskz_rcp28_round_sd(__mmask8 k, __m128d a, __m128d b);

Computes the approximate reciprocal of lower float64 element in b, stores the result in lower destination element using zeromask k (the element is zeroed out when mask bit 0 is not set), and copies upper element from a to upper destination element.

### Note

The maximum relative error for this approximation is less than 2(-28).

_mm512_rcp28_round_ss

    extern __m128 __cdecl _mm512_rcp28_round_ss(__m128 a, __m128 b);

Computes approximate reciprocal of lower float32 element in b, stores the result in lower destination element, and copies upper three packed elements from a to upper destination elements.

### Note

The maximum relative error for this approximation is less than 2(-28).

_mm512_mask_rcp28_round_ss

    extern __m128 __cdecl _mm512_mask_rcp28_round_ss(__m128 src, __mmask8 k, __m128 a, __m128 b);

Computes approximate reciprocal of lower float32 element in b, stores the result in lower destination element using writemask k (the element is copied from src when mask bit 0 is not set), and copies upper three packed elements from a to upper destination elements.

### Note

The maximum relative error for this approximation is less than 2(-28).

_mm512_maskz_rcp28_round_ss

    extern __m128 __cdecl _mm512_maskz_rcp28_round_ss(__mmask8 k, __m128 a, __m128 b);

Computes approximate reciprocal of lower float32 element in b, stores the result in lower destination element using zeromask k (the element is zeroed out when mask bit 0 is not set), and copies upper three packed elements from a to upper destination elements.

### Note

The maximum relative error for this approximation is less than 2(-28).

_mm512_rcp28_ss

    extern __m128 __cdecl _mm512_rcp28_ss(__m128 a, __m128 b);

Computes approximate reciprocal of lower float32 element in b, stores the result in lower destination element, and copies upper three packed elements from a to upper destination elements.

### Note

The maximum relative error for this approximation is less than 2(-28).

_mm512_mask_rcp28_ss

    extern __m128 __cdecl _mm512_mask_rcp28_ss(__m128 src, __mmask8 k, __m128 a, __m128 b);

Computes approximate reciprocal of lower float32 element in b, stores the result in lower destination element using writemask k (the element is copied from src when mask bit 0 is not set), and copies upper three packed elements from a to upper destination elements.

### Note

The maximum relative error for this approximation is less than 2(-28).

_mm512_maskz_rcp28_ss

    extern __m128 __cdecl _mm512_maskz_rcp28_ss(__mmask8 k, __m128 a, __m128 b);

Computes approximate reciprocal of lower float32 element in b, stores the result in lower destination element using zeromask k (the element is zeroed out when mask bit 0 is not set), and copies upper three packed elements from a to upper destination elements.

### Note

The maximum relative error for this approximation is less than 2(-28).

_mm512_recip_pd

    extern __m512d __cdecl _mm512_recip_pd(__m512d a);

Computes approximate reciprocal of float64 elements in a, and stores the result.

_mm512_mask_recip_pd

    extern __m512d __cdecl _mm512_mask_recip_pd(__m512d src, __mmask8 k, __m512d a);

Computes approximate reciprocal of float64 elements in a, and stores the result using writemask k (the element is copied from src when mask bit 0 is not set).

_mm512_recip_ps

    extern __m512 __cdecl _mm512_recip_ps(__m512 a);

Computes approximate reciprocal of float32 elements in a, and stores the result.

_mm512_mask_recip_ps

    extern __m512 __cdecl _mm512_mask_recip_ps(__m512 src, __mmask16 k, __m512 a);

Computes approximate reciprocal of float32 elements in a, and stores the result using writemask k (the element is copied from src when mask bit 0 is not set).

Parent topic: Intrinsics for Short Vector Math Library Operations (SVML)