## Operator: /

``` operator / { associativity left precedence }```

### Declarations

func /(_: Double, rhs: Double)

Returns the quotient of dividing the first value by the second, rounded to a representable value.

The division operator (`/`) calculates the quotient of the division if `rhs` is nonzero. If `rhs` is zero, the result of the division is infinity, with the sign of the result matching the sign of `lhs`.

``````let x = 16.875
let y = x / 2.25
// y == 7.5

let z = x / 0
// z.isInfinite == true``````

The `/` operator implements the division operation defined by the IEEE 754 specification.

Parameters: lhs: The value to divide. rhs: The value to divide `lhs` by.

#### Declaration

`func /(lhs: Double, rhs: Double) -> Double`
func /(_: Float, rhs: Float)

Returns the quotient of dividing the first value by the second, rounded to a representable value.

The division operator (`/`) calculates the quotient of the division if `rhs` is nonzero. If `rhs` is zero, the result of the division is infinity, with the sign of the result matching the sign of `lhs`.

``````let x = 16.875
let y = x / 2.25
// y == 7.5

let z = x / 0
// z.isInfinite == true``````

The `/` operator implements the division operation defined by the IEEE 754 specification.

Parameters: lhs: The value to divide. rhs: The value to divide `lhs` by.

#### Declaration

`func /(lhs: Float, rhs: Float) -> Float`
func /(_: Float80, rhs: Float80)

Returns the quotient of dividing the first value by the second, rounded to a representable value.

The division operator (`/`) calculates the quotient of the division if `rhs` is nonzero. If `rhs` is zero, the result of the division is infinity, with the sign of the result matching the sign of `lhs`.

``````let x = 16.875
let y = x / 2.25
// y == 7.5

let z = x / 0
// z.isInfinite == true``````

The `/` operator implements the division operation defined by the IEEE 754 specification.

Parameters: lhs: The value to divide. rhs: The value to divide `lhs` by.

#### Declaration

`func /(lhs: Float80, rhs: Float80) -> Float80`
func /(_: Int, rhs: Int)

Returns the quotient of dividing the first value by the second.

For integer types, any remainder of the division is discarded.

``````let x = 21 / 5
// x == 4``````

Parameters: lhs: The value to divide. rhs: The value to divide `lhs` by. `rhs` must not be zero.

#### Declaration

`func /(lhs: Int, rhs: Int) -> Int`
func /(_: Int8, rhs: Int8)

Returns the quotient of dividing the first value by the second.

For integer types, any remainder of the division is discarded.

``````let x = 21 / 5
// x == 4``````

Parameters: lhs: The value to divide. rhs: The value to divide `lhs` by. `rhs` must not be zero.

#### Declaration

`func /(lhs: Int8, rhs: Int8) -> Int8`
func /(_: Int16, rhs: Int16)

Returns the quotient of dividing the first value by the second.

For integer types, any remainder of the division is discarded.

``````let x = 21 / 5
// x == 4``````

Parameters: lhs: The value to divide. rhs: The value to divide `lhs` by. `rhs` must not be zero.

#### Declaration

`func /(lhs: Int16, rhs: Int16) -> Int16`
func /(_: Int32, rhs: Int32)

Returns the quotient of dividing the first value by the second.

For integer types, any remainder of the division is discarded.

``````let x = 21 / 5
// x == 4``````

Parameters: lhs: The value to divide. rhs: The value to divide `lhs` by. `rhs` must not be zero.

#### Declaration

`func /(lhs: Int32, rhs: Int32) -> Int32`
func /(_: Int64, rhs: Int64)

Returns the quotient of dividing the first value by the second.

For integer types, any remainder of the division is discarded.

``````let x = 21 / 5
// x == 4``````

Parameters: lhs: The value to divide. rhs: The value to divide `lhs` by. `rhs` must not be zero.

#### Declaration

`func /(lhs: Int64, rhs: Int64) -> Int64`
func /(_: UInt, rhs: UInt)

Returns the quotient of dividing the first value by the second.

For integer types, any remainder of the division is discarded.

``````let x = 21 / 5
// x == 4``````

Parameters: lhs: The value to divide. rhs: The value to divide `lhs` by. `rhs` must not be zero.

#### Declaration

`func /(lhs: UInt, rhs: UInt) -> UInt`
func /(_: UInt8, rhs: UInt8)

Returns the quotient of dividing the first value by the second.

For integer types, any remainder of the division is discarded.

``````let x = 21 / 5
// x == 4``````

Parameters: lhs: The value to divide. rhs: The value to divide `lhs` by. `rhs` must not be zero.

#### Declaration

`func /(lhs: UInt8, rhs: UInt8) -> UInt8`
func /(_: UInt16, rhs: UInt16)

Returns the quotient of dividing the first value by the second.

For integer types, any remainder of the division is discarded.

``````let x = 21 / 5
// x == 4``````

Parameters: lhs: The value to divide. rhs: The value to divide `lhs` by. `rhs` must not be zero.

#### Declaration

`func /(lhs: UInt16, rhs: UInt16) -> UInt16`
func /(_: UInt32, rhs: UInt32)

Returns the quotient of dividing the first value by the second.

For integer types, any remainder of the division is discarded.

``````let x = 21 / 5
// x == 4``````

Parameters: lhs: The value to divide. rhs: The value to divide `lhs` by. `rhs` must not be zero.

#### Declaration

`func /(lhs: UInt32, rhs: UInt32) -> UInt32`
func /(_: UInt64, rhs: UInt64)

Returns the quotient of dividing the first value by the second.

For integer types, any remainder of the division is discarded.

``````let x = 21 / 5
// x == 4``````

Parameters: lhs: The value to divide. rhs: The value to divide `lhs` by. `rhs` must not be zero.

#### Declaration

`func /(lhs: UInt64, rhs: UInt64) -> UInt64`