<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.10.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Swift",
  "identifier" : "/documentation/Swift/FixedWidthInteger/dividingFullWidth(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Swift"
    ],
    "preciseIdentifier" : "s:s17FixedWidthIntegerP012dividingFullB0yx8quotient_x9remaindertx4high_9MagnitudeQz3lowt_tF"
  },
  "title" : "dividingFullWidth(_:)"
}
-->

# dividingFullWidth(_:)

Returns a tuple containing the quotient and remainder obtained by dividing
the given value by this value.

```
func dividingFullWidth(_ dividend: (high: Self, low: Self.Magnitude)) -> (quotient: Self, remainder: Self)
```

## Parameters

`dividend`

A tuple containing the high and low parts of a
double-width integer.

## Return Value

A tuple containing the quotient and remainder obtained by
dividing `dividend` by this value.

## Discussion

The resulting quotient must be representable within the bounds of the
type. If the quotient is too large to represent in the type, a runtime
error may occur.

The following example divides a value that is too large to be represented
using a single `Int` instance by another `Int` value. Because the quotient
is representable as an `Int`, the division succeeds.

```
// 'dividend' represents the value 0x506f70652053616e74612049494949
let dividend = (22640526660490081, 7959093232766896457 as UInt)
let divisor = 2241543570477705381

let (quotient, remainder) = divisor.dividingFullWidth(dividend)
// quotient == 186319822866995413
// remainder == 0
```

---

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)