---
title: vDSP_vsbsmD
framework: Accelerate
role: symbol
role_heading: Function
platforms: [iOS 4.0+, iPadOS 4.0+, Mac Catalyst 13.1+, macOS 10.4+, visionOS 1.0+, watchOS 2.0+]
path: accelerate/vdsp_vsbsmd
---

# vDSP_vsbsmD

Calculates the double-precision element-wise product of the difference of two vectors and a scalar value, using the specified stride.

## Declaration

```occ
extern void vDSP_vsbsmD(const double *__A, vDSP_Stride __IA, const double *__B, vDSP_Stride __IB, const double *__C, double *__D, vDSP_Stride __ID, vDSP_Length __N);
```

## Parameters

- `__A`: The input vector A in D = (A - B) * C.
- `__IA`: The distance between the elements in the input vector A.
- `__B`: The input vector B in D = (A - B) * C.
- `__IB`: The distance between the elements in the input vector B.
- `__C`: The input scalar value C in D = (A - B) * C.
- `__D`: The output vector D in D = (A - B) * C.
- `__ID`: The distance between the elements in the output vector D.
- `__N`: The number of elements that the function processes.

## Discussion

Discussion This function calculates the element-wise difference of vectors A and B, multiplies the difference by scalar value C, and writes the result to vector D, as follows:  for (n = 0; n < N; ++n)     D[n] = (A[n] - B[n]) * C;

The following code shows an example of using this function:

## See Also

### Vector-vector-scalar subtract-multiply operations

- [vDSP_vsbsm](accelerate/vdsp_vsbsm.md)
