---
title: FloatingPointRoundingRule.up
framework: swift
role: symbol
role_heading: Case
path: swift/floatingpointroundingrule/up
---

# FloatingPointRoundingRule.up

Round to the closest allowed value that is greater than or equal to the source.

## Declaration

```swift
case up
```

## Discussion

Discussion The following example shows the results of rounding numbers using this rule: (5.2).rounded(.up) // 6.0 (5.5).rounded(.up) // 6.0 (-5.2).rounded(.up) // -5.0 (-5.5).rounded(.up) // -5.0 This rule is equivalent to the C ceil function and implements the roundToIntegralTowardPositive operation defined by the IEEE 754 specification.
