<!--
{
  "documentType" : "article",
  "framework" : "Accelerate",
  "identifier" : "/documentation/Accelerate/vector-to-vector-minima-and-maxima",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Vector-to-vector minima and maxima"
}
-->

# Vector-to-vector minima and maxima

Compute the element-wise minimum or maximum values or magnitudes in a vector.

## Topics

### Vector-to-Vector Minima

[`static func minimum<U>(U, U) -> [Double]`](/documentation/Accelerate/vDSP/minimum(_:_:)-9t6e4)

Returns a double-precision array containing the minimum of the corresponding values of two vectors.

[`static func minimum<U>(U, U) -> [Float]`](/documentation/Accelerate/vDSP/minimum(_:_:)-1rpb2)

Returns a single-precision array containing the minimum of the corresponding values of two vectors.

[`static func minimum<U, V>(U, U, result: inout V)`](/documentation/Accelerate/vDSP/minimum(_:_:result:)-1bdzw)

Calculates the double-precision minimum of the corresponding values of two vectors.

[`static func minimum<U, V>(U, U, result: inout V)`](/documentation/Accelerate/vDSP/minimum(_:_:result:)-3eh5g)

Calculates the single-precision minimum of the corresponding values of two vectors.

[`extern void vDSP_vmin(const float *__A, vDSP_Stride __IA, const float *__B, vDSP_Stride __IB, float *__C, vDSP_Stride __IC, vDSP_Length __N);`](/documentation/Accelerate/vDSP_vmin)

Calculates the single-precision minimum of the corresponding values of two vectors using specified strides.

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

Calculates the double-precision minimum of the corresponding values of two vectors using specified strides.

[`extern void vDSP_vminmg(const float *__A, vDSP_Stride __IA, const float *__B, vDSP_Stride __IB, float *__C, vDSP_Stride __IC, vDSP_Length __N);`](/documentation/Accelerate/vDSP_vminmg)

Calculates the single-precision minimum magnitude of the corresponding values of two vectors using specified strides.

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

Calculates the double-precision minimum magnitude of the corresponding values of two vectors using specified strides.

### Vector-to-Vector Maxima

[`static func maximum<U>(U, U) -> [Double]`](/documentation/Accelerate/vDSP/maximum(_:_:)-4sao3)

Returns a double-precision array containing the maximum of the corresponding values of two vectors.

[`static func maximum<U>(U, U) -> [Float]`](/documentation/Accelerate/vDSP/maximum(_:_:)-6306m)

Returns a single-precision array containing the maximum of the corresponding values of two vectors.

[`static func maximum<U, V>(U, U, result: inout V)`](/documentation/Accelerate/vDSP/maximum(_:_:result:)-1rxz4)

Calculates the maximum of the corresponding double-precision values of two vectors.

[`static func maximum<U, V>(U, U, result: inout V)`](/documentation/Accelerate/vDSP/maximum(_:_:result:)-4021u)

Calculates the maximum of the corresponding single-precision values of two vectors.

[`extern void vDSP_vmax(const float *__A, vDSP_Stride __IA, const float *__B, vDSP_Stride __IB, float *__C, vDSP_Stride __IC, vDSP_Length __N);`](/documentation/Accelerate/vDSP_vmax)

Calculates the single-precision maximum of the corresponding values of two vectors using specified strides.

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

Calculates the double-precision maximum of the corresponding values of two vectors using specified strides.

[`extern void vDSP_vmaxmg(const float *__A, vDSP_Stride __IA, const float *__B, vDSP_Stride __IB, float *__C, vDSP_Stride __IC, vDSP_Length __N);`](/documentation/Accelerate/vDSP_vmaxmg)

Calculates the single-precision maximum magnitude of the corresponding values of two vectors using specified strides.

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

Calculates the double-precision maximum magnitude of the corresponding values of two vectors using specified strides.



---

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)