<!--
{
  "documentType" : "article",
  "framework" : "Accelerate",
  "identifier" : "/documentation/Accelerate/double-precision-floating-point-to-integer-conversion",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Double-precision floating point to integer conversion"
}
-->

# Double-precision floating point to integer conversion

Perform element-wise double-precision floating-point to integer conversion.

## Topics

### Floating point to integer conversion

[`static func floatingPointToInteger<T, U>(T, integerType: U.Type, rounding: vDSP.RoundingMode) -> [U]`](/documentation/Accelerate/vDSP/floatingPointToInteger(_:integerType:rounding:)-33dtm)

Returns double-precision values converted to integer values.

[`enum RoundingMode`](/documentation/Accelerate/vDSP/RoundingMode)

Floating point to integer conversion rounding modes.

### Floating point to 8-bit integer conversion

[`static func convertElements<U, V>(of: U, to: inout V, rounding: vDSP.RoundingMode)`](/documentation/Accelerate/vDSP/convertElements(of:to:rounding:)-2ig4y)

Converts double-precision values to 8-bit signed integers.

[`static func convertElements<U, V>(of: U, to: inout V, rounding: vDSP.RoundingMode)`](/documentation/Accelerate/vDSP/convertElements(of:to:rounding:)-3sgv7)

Converts double-precision values to 8-bit unsigned integers.

[`enum RoundingMode`](/documentation/Accelerate/vDSP/RoundingMode)

Floating point to integer conversion rounding modes.

[`extern void vDSP_vfix8D(const double *__A, vDSP_Stride __IA, char *__C, vDSP_Stride __IC, vDSP_Length __N);`](/documentation/Accelerate/vDSP_vfix8D)

Converts a vector of double-precision floating-point values to signed 8-bit integer values, and rounds towards zero.

[`extern void vDSP_vfixr8D(const double *__A, vDSP_Stride __IA, char *__C, vDSP_Stride __IC, vDSP_Length __N);`](/documentation/Accelerate/vDSP_vfixr8D)

Converts a vector of double-precision floating-point values to signed 8-bit integer values, and rounds towards the nearest integer.

[`extern void vDSP_vfixu8D(const double *__A, vDSP_Stride __IA, unsigned char *__C, vDSP_Stride __IC, vDSP_Length __N);`](/documentation/Accelerate/vDSP_vfixu8D)

Converts a vector of double-precision floating-point values to unsigned 8-bit integer values, and rounds towards zero.

[`extern void vDSP_vfixru8D(const double *__A, vDSP_Stride __IA, unsigned char *__C, vDSP_Stride __IC, vDSP_Length __N);`](/documentation/Accelerate/vDSP_vfixru8D)

Converts a vector of double-precision floating-point values to unsigned 8-bit integer values, and rounds towards the nearest integer.

### Floating point to 16-bit integer conversion

[`static func convertElements<U, V>(of: U, to: inout V, rounding: vDSP.RoundingMode)`](/documentation/Accelerate/vDSP/convertElements(of:to:rounding:)-4xlg5)

Converts double-precision values to 16-bit signed integers.

[`static func convertElements<U, V>(of: U, to: inout V, rounding: vDSP.RoundingMode)`](/documentation/Accelerate/vDSP/convertElements(of:to:rounding:)-2oiwm)

Converts double-precision values to 16-bit unsigned integers.

[`enum RoundingMode`](/documentation/Accelerate/vDSP/RoundingMode)

Floating point to integer conversion rounding modes.

[`extern void vDSP_vfix16D(const double *__A, vDSP_Stride __IA, short *__C, vDSP_Stride __IC, vDSP_Length __N);`](/documentation/Accelerate/vDSP_vfix16D)

Converts a vector of double-precision floating-point values to signed 16-bit integer values, and rounds towards zero.

[`extern void vDSP_vfixr16D(const double *__A, vDSP_Stride __IA, short *__C, vDSP_Stride __IC, vDSP_Length __N);`](/documentation/Accelerate/vDSP_vfixr16D)

Converts a vector of double-precision floating-point values to signed 16-bit integer values, and rounds towards the nearest integer.

[`extern void vDSP_vfixu16D(const double *__A, vDSP_Stride __IA, unsigned short *__C, vDSP_Stride __IC, vDSP_Length __N);`](/documentation/Accelerate/vDSP_vfixu16D)

Converts a vector of double-precision floating-point values to unsigned 16-bit integer values, and rounds towards zero.

[`extern void vDSP_vfixru16D(const double *__A, vDSP_Stride __IA, unsigned short *__C, vDSP_Stride __IC, vDSP_Length __N);`](/documentation/Accelerate/vDSP_vfixru16D)

Converts a vector of double-precision floating-point values to unsigned 16-bit integer values, and rounds towards the nearest integer.

### Floating point to 32-bit integer conversion

[`static func convertElements<U, V>(of: U, to: inout V, rounding: vDSP.RoundingMode)`](/documentation/Accelerate/vDSP/convertElements(of:to:rounding:)-3sxak)

Converts double-precision values to 32-bit signed integers.

[`static func convertElements<U, V>(of: U, to: inout V, rounding: vDSP.RoundingMode)`](/documentation/Accelerate/vDSP/convertElements(of:to:rounding:)-3t71v)

Converts double-precision values to 32-bit unsigned integers.

[`enum RoundingMode`](/documentation/Accelerate/vDSP/RoundingMode)

Floating point to integer conversion rounding modes.

[`extern void vDSP_vfix32D(const double *__A, vDSP_Stride __IA, int *__C, vDSP_Stride __IC, vDSP_Length __N);`](/documentation/Accelerate/vDSP_vfix32D)

Converts a vector of double-precision floating-point values to signed 32-bit integer values, and rounds towards zero.

[`extern void vDSP_vfixr32D(const double *__A, vDSP_Stride __IA, int *__C, vDSP_Stride __IC, vDSP_Length __N);`](/documentation/Accelerate/vDSP_vfixr32D)

Converts a vector of double-precision floating-point values to signed 32-bit integer values, and rounds towards the nearest integer.

[`extern void vDSP_vfixu32D(const double *__A, vDSP_Stride __IA, unsigned int *__C, vDSP_Stride __IC, vDSP_Length __N);`](/documentation/Accelerate/vDSP_vfixu32D)

Converts a vector of double-precision floating-point values to unsigned 32-bit integer values, and rounds towards zero.

[`extern void vDSP_vfixru32D(const double *__A, vDSP_Stride __IA, unsigned int *__C, vDSP_Stride __IC, vDSP_Length __N);`](/documentation/Accelerate/vDSP_vfixru32D)

Converts a vector of double-precision floating-point values to unsigned 32-bit integer values, and rounds towards the nearest integer.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)