<!--
{
  "availability" : [
    "iOS: 4.0.0 -",
    "iPadOS: 4.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.4.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Accelerate",
  "identifier" : "/documentation/Accelerate/vDSP_vmaxD",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Accelerate"
    ],
    "preciseIdentifier" : "c:@F@vDSP_vmaxD"
  },
  "title" : "vDSP_vmaxD"
}
-->

# vDSP_vmaxD

Calculates the double-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);
```

## Parameters

`__A`

Double-precision real input vector.

`__IA`

Stride for `A`.

`__B`

Double-precision real input vector.

`__IB`

Stride for `B`.

`__C`

Double-precision real output vector.

`__IC`

Stride for `C`.

`__N`

The number of elements to process.

## Discussion

This function compares the first `N` elements of `A` with corresponding elements of `B`, leaving the greater (or equal) values as corresponding elements of `C`:

```c
for (n = 0; n < N; ++n)
    C[n] = B[n] <= A[n] ? A[n] : B[n];
```

---

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)