---
title: "negativeAbsolute(_:)"
framework: accelerate
role: symbol
role_heading: Type Method
path: "accelerate/vdsp/negativeabsolute(_:)-66a7a"
---

# negativeAbsolute(_:)

Returns the negative absolute value of each element in the supplied single-precision vector.

## Declaration

```swift
static func negativeAbsolute<U>(_ vector: U) -> [Float] where U : AccelerateBuffer, U.Element == Float
```

## Parameters

- `vector`: The source vector.

## Discussion

Discussion For example, the following code calculates the negative absolute values of the elements of an array:     let values: [Float] = [-1, 2, -3, 4, -5, 6, -7, 8]          let negativeAbsoluteValues = vDSP.negativeAbsolute(values)          // Prints "[-1.0, -2.0, -3.0, -4.0, -5.0, -6.0, -7.0, -8.0]".     print(negativeAbsoluteValues)

## See Also

### Vector negative absolute functions

- [negativeAbsolute(_:)](accelerate/vdsp/negativeabsolute(_:)-1b5m6.md)
- [negativeAbsolute(_:result:)](accelerate/vdsp/negativeabsolute(_:result:)-85gj0.md)
- [negativeAbsolute(_:result:)](accelerate/vdsp/negativeabsolute(_:result:)-1gpcy.md)
