---
title: FloatingPointRoundingRule
framework: swift
role: symbol
role_heading: Enumeration
path: swift/floatingpointroundingrule
---

# FloatingPointRoundingRule

A rule for rounding a floating-point number.

## Declaration

```swift
enum FloatingPointRoundingRule
```

## Topics

### Operators

- [==(_:_:)](swift/floatingpointroundingrule/==(_:_:).md)

### Enumeration Cases

- [FloatingPointRoundingRule.awayFromZero](swift/floatingpointroundingrule/awayfromzero.md)
- [FloatingPointRoundingRule.down](swift/floatingpointroundingrule/down.md)
- [FloatingPointRoundingRule.toNearestOrAwayFromZero](swift/floatingpointroundingrule/tonearestorawayfromzero.md)
- [FloatingPointRoundingRule.toNearestOrEven](swift/floatingpointroundingrule/tonearestoreven.md)
- [FloatingPointRoundingRule.towardZero](swift/floatingpointroundingrule/towardzero.md)
- [FloatingPointRoundingRule.up](swift/floatingpointroundingrule/up.md)

### Instance Properties

- [hashValue](swift/floatingpointroundingrule/hashvalue.md)

### Instance Methods

- [hash(into:)](swift/floatingpointroundingrule/hash(into:).md)

### Default Implementations

- [Equatable Implementations](swift/floatingpointroundingrule/equatable-implementations.md)

## Relationships

### Conforms To

- [Equatable](swift/equatable.md)
- [Escapable](swift/escapable.md)
- [Hashable](swift/hashable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Floating-Point Characteristics

- [FloatingPointClassification](swift/floatingpointclassification.md)
- [FloatingPointSign](swift/floatingpointsign.md)
