<!--
{
  "documentType" : "article",
  "framework" : "Swift",
  "identifier" : "/documentation/Swift/global-numeric-functions",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Global Numeric Functions"
}
-->

# Global Numeric Functions

Use these functions with numeric values and other comparable types.

## Topics

### Choosing the Smallest and Largest Value

[`func min<T>(T, T) -> T`](/documentation/Swift/min(_:_:))

Returns the lesser of two comparable values.

[`func min<T>(T, T, T, T...) -> T`](/documentation/Swift/min(_:_:_:_:))

Returns the least argument passed.

[`func max<T>(T, T) -> T`](/documentation/Swift/max(_:_:))

Returns the greater of two comparable values.

[`func max<T>(T, T, T, T...) -> T`](/documentation/Swift/max(_:_:_:_:))

Returns the greatest argument passed.

### Finding the Absolute Value

[`func abs<T>(T) -> T`](/documentation/Swift/abs(_:))

Returns the absolute value of the given number.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)