---
title: "powerToDecibels(_:zeroReference:)"
framework: accelerate
role: symbol
role_heading: Type Method
path: "accelerate/vdsp/powertodecibels(_:zeroreference:)-861j5"
---

# powerToDecibels(_:zeroReference:)

Returns single-precision power values converted to decibel values.

## Declaration

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

## Parameters

- `power`: The input vector that defines the power values.
- `zeroReference`: The zero reference that the function uses for the conversion.

## Discussion

Discussion The function uses the following calculation to perform the conversion: alpha = 10;

for (n = 0; n < N; ++n)     C[n] = alpha * log10(A[n] / B[0]);

## See Also

### Converting single-precision power or amplitude values to decibel values

- [amplitudeToDecibels(_:zeroReference:)](accelerate/vdsp/amplitudetodecibels(_:zeroreference:)-88bpy.md)
- [convert(amplitude:toDecibels:zeroReference:)](accelerate/vdsp/convert(amplitude:todecibels:zeroreference:)-83uy1.md)
- [convert(power:toDecibels:zeroReference:)](accelerate/vdsp/convert(power:todecibels:zeroreference:)-5u3vs.md)
