<br />

<button value="stable" default="">See Stable</button> <button value="nightly">See Nightly</button>

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.21.0/tensorflow/python/ops/math_ops.py#L1704-L1731) |

Divides `x / y` elementwise, rounding toward the most negative integer.

#### View aliases


**Compat aliases for migration**

See
[Migration guide](https://www.tensorflow.org/guide/migrate) for
more details.

[`tf.compat.v1.floordiv`](https://www.tensorflow.org/api_docs/python/tf/math/floordiv), [`tf.compat.v1.math.floordiv`](https://www.tensorflow.org/api_docs/python/tf/math/floordiv)

<br />

    tf.math.floordiv(
        x, y, name=None
    )

Mathematically, this is equivalent to floor(x / y). For example:
floor(8.4 / 4.0) = floor(2.1) = 2.0
floor(-8.4 / 4.0) = floor(-2.1) = -3.0
This is equivalent to the '//' operator in Python 3.0 and above.

> [!NOTE]
> **Note:** `x` and `y` must have the same type, and the result will have the same type as well.

<br />

<br />

<br />

| ## Args ||
|---|---|
| `x` | `Tensor` numerator of real numeric type. |
| `y` | `Tensor` denominator of real numeric type. |
| `name` | A name for the operation (optional). |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| `x / y` rounded toward -infinity. ||

<br />

<br />

<br />

<br />

| ## Raises ||
|---|---|
| `TypeError` | If the inputs are complex. |

<br />