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

# vvfabsf(_:_:_:)

Calculates the absolute value for each element in an array of single-precision values.

```
func vvfabsf(_: UnsafeMutablePointer<Float>, _: UnsafePointer<Float>, _: UnsafePointer<Int32>)
```

## Discussion

### Parameters:

- parameter 1: The output array, *y*.
- parameter 2: The input array, *x*.
- parameter 3: The number of elements in the arrays.

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

```objc
float x[] = {-1.2, 5.5, -3.9, 26.0};
float y[4];
int n = 4;
 
vvfabsf(y, x, &n);
 
NSLog(@"y: [%lf, %lf, %lf, %lf]", y[0], y[1], y[2], y[3]);
```

---

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)