---
title: "precision(_:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/integerformatstyle/percent/precision(_:)"
---

# precision(_:)

Modifies the format style to use the specified precision.

## Declaration

```swift
func precision(_ p: IntegerFormatStyle<Value>.Percent.Configuration.Precision) -> IntegerFormatStyle<Value>.Percent
```

## Parameters

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

## Return Value

Return Value An integer 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, although IntegerFormatStyle.Currency only uses the former. You can also set a fixed number of significant digits.

## See Also

### Customizing style behavior

- [decimalSeparator(strategy:)](foundation/integerformatstyle/percent/decimalseparator(strategy:).md)
- [grouping(_:)](foundation/integerformatstyle/percent/grouping(_:).md)
- [locale(_:)](foundation/integerformatstyle/percent/locale(_:).md)
- [notation(_:)](foundation/integerformatstyle/percent/notation(_:).md)
- [rounded(rule:increment:)](foundation/integerformatstyle/percent/rounded(rule:increment:).md)
- [scale(_:)](foundation/integerformatstyle/percent/scale(_:).md)
- [sign(strategy:)](foundation/integerformatstyle/percent/sign(strategy:).md)
- [IntegerFormatStyle.Percent.Configuration](foundation/integerformatstyle/percent/configuration.md)
- [NumberFormatStyleConfiguration](foundation/numberformatstyleconfiguration.md)
