---
title: OSLogFloatFormatting
framework: os
role: symbol
role_heading: Structure
path: os/oslogfloatformatting
---

# OSLogFloatFormatting

The formatting options for double and floating-point numbers.

## Declaration

```swift
@frozen struct OSLogFloatFormatting
```

## Mentioned in

Generating Log Messages from Your Code

## Overview

Overview An OSLogFloatFormatting structure encapsulates the formatting details for double and float values. Use the static fixed, hex, exponential, and hybrid structures to apply default formatting for floating-point values. You can also create new OSLogFloatFormatting structures that customize the rules for handling a leading plus sign, precision information, and more.

## Topics

### Getting the Standard Formats

- [fixed](os/oslogfloatformatting/fixed.md)
- [hex](os/oslogfloatformatting/hex.md)
- [exponential](os/oslogfloatformatting/exponential.md)
- [hybrid](os/oslogfloatformatting/hybrid.md)

### Creating a Custom Formatting Object

- [exponential(explicitPositiveSign:uppercase:)](os/oslogfloatformatting/exponential(explicitpositivesign:uppercase:).md)
- [exponential(precision:explicitPositiveSign:uppercase:)](os/oslogfloatformatting/exponential(precision:explicitpositivesign:uppercase:).md)
- [fixed(explicitPositiveSign:uppercase:)](os/oslogfloatformatting/fixed(explicitpositivesign:uppercase:).md)
- [fixed(precision:explicitPositiveSign:uppercase:)](os/oslogfloatformatting/fixed(precision:explicitpositivesign:uppercase:).md)
- [hex(explicitPositiveSign:uppercase:)](os/oslogfloatformatting/hex(explicitpositivesign:uppercase:).md)
- [hybrid(explicitPositiveSign:uppercase:)](os/oslogfloatformatting/hybrid(explicitpositivesign:uppercase:).md)
- [hybrid(precision:explicitPositiveSign:uppercase:)](os/oslogfloatformatting/hybrid(precision:explicitpositivesign:uppercase:).md)

## See Also

### Value Formatters

- [OSLogBoolFormat](os/oslogboolformat.md)
- [OSLogIntegerFormatting](os/oslogintegerformatting.md)
- [OSLogInt32ExtendedFormat](os/oslogint32extendedformat.md)
- [OSLogPointerFormat](os/oslogpointerformat.md)
