<!--
{
  "availability" : [
    "macOS: 10.0.0 - 10.14.0"
  ],
  "documentType" : "symbol",
  "framework" : "Accelerate",
  "identifier" : "/documentation/Accelerate/vSzaxpy(_:_:_:_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Accelerate"
    ],
    "preciseIdentifier" : "c:@F@vSzaxpy"
  },
  "title" : "vSzaxpy(_:_:_:_:_:)"
}
-->

# vSzaxpy(_:_:_:_:_:)

Multiplies a vector by a scalar, adds it to a second vector, and stores the result in a third vector.

```
func vSzaxpy(_ n: Int32, _ alpha: Float, _ x: UnsafePointer<vFloat>, _ y: UnsafePointer<vFloat>, _ z: UnsafeMutablePointer<vFloat>)
```

## Parameters

`n`

number of elements in vectors `x`, `y`, and `z`; must be a multiple of 4.

`alpha`

multiplier.

`x`

source vector with `n` elements of type `float`.

`y`

source vector with `n` elements of type `float`.

`z`

source vector with `n` elements of type `float`.

## Discussion

Each element of vector `x` is multiplied by `alpha`, then the corresponding element of `yY` is added. Results are stored in the corresponding elements of `z`.

---

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)