---
title: "precision(_:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/decimal/formatstyle/currency/precision(_:)"
---

# precision(_:)

Modifies the format style to use the specified precision.

## Declaration

```swift
func precision(_ p: Decimal.FormatStyle.Currency.Configuration.Precision) -> Decimal.FormatStyle.Currency
```

## Parameters

- `p`: The precision to apply to the format style.

## Return Value

Return Value A decimal format style modified to use the specified precision.

## Discussion

Discussion The NumberFormatStyleConfiguration.Precision type lets you specify a fixed number of digits to show for a number’s integer and fractional part. You can also set a fixed number of significant digits.

## See Also

### Customizing style behavior

- [decimalSeparator(strategy:)](foundation/decimal/formatstyle/currency/decimalseparator(strategy:).md)
- [grouping(_:)](foundation/decimal/formatstyle/currency/grouping(_:).md)
- [locale(_:)](foundation/decimal/formatstyle/currency/locale(_:).md)
- [presentation(_:)](foundation/decimal/formatstyle/currency/presentation(_:).md)
- [rounded(rule:increment:)](foundation/decimal/formatstyle/currency/rounded(rule:increment:).md)
- [scale(_:)](foundation/decimal/formatstyle/currency/scale(_:).md)
- [sign(strategy:)](foundation/decimal/formatstyle/currency/sign(strategy:).md)
- [Decimal.FormatStyle.Currency.Configuration](foundation/decimal/formatstyle/currency/configuration.md)
- [CurrencyFormatStyleConfiguration](foundation/currencyformatstyleconfiguration.md)
