# tf.math.floordiv

<br />

|---|---|
| [![](https://www.tensorflow.org/images/tf_logo_32px.png) TensorFlow 2 version](https://www.tensorflow.org/api_docs/python/tf/math/floordiv) | [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/python/ops/math_ops.py#L1152-L1180) |

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

#### View aliases


**Main aliases**

\`tf.floordiv\`
**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), \`tf.compat.v2.math.floordiv\`

<br />

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

The same as [`tf.compat.v1.div(x,y)`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/div) for integers, but uses
`tf.floor(tf.compat.v1.div(x,y))` for
floating point arguments so that the result is always an integer (though
possibly an integer represented as floating point). This op is generated by
`x // y` floor division in Python 3 and in Python 2.7 with
`from __future__ import division`.

`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 down. ||

<br />

<br />

<br />

<br />

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

<br />