<!--
{
  "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_mvessqD",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Accelerate"
    ],
    "preciseIdentifier" : "c:@F@vDSP_mvessqD"
  },
  "title" : "vDSP_mvessqD"
}
-->

# vDSP_mvessqD

Calculates the mean of signed squares of a double-precision vector.

```
extern void vDSP_mvessqD(const double *__A, vDSP_Stride __IA, double *__C, vDSP_Length __N);
```

## Parameters

`__A`

Single-precision real input vector.

`__IA`

Stride for `A.`

`__C`

Output scalar.

`__N`

The number of elements to process. If `N` is zero (`0`), this function returns `-INFINITY`.

## Discussion

This function calculates the mean of squares of the first `N` elements of the input vector and writes the result to the output scalar parameter, `C`.

The following code shows an example of using [`vDSP_mvessqD`](/documentation/Accelerate/vDSP_mvessqD):

```swift
    let stride = vDSP_Stride(1)
    
    let a: [Double] = [-8, -4, -2, 0, 2, 4, 8]
    let n = vDSP_Length(a.count)
    
    var c = Double()
    
    vDSP_mvessqD(a,
                 stride,
                 &c,
                 n)
    
    print(c) // Prints "0.0".
```

---

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)