# tf.math.floormod

<br />

|---|
| [![](https://www.tensorflow.org/images/tf_logo_32px.png) TensorFlow 1 version](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/math/floormod) |

Returns element-wise remainder of division. When `x < 0` xor `y < 0` is

#### View aliases


**Main aliases**

[`tf.math.mod`](https://www.tensorflow.org/api_docs/python/tf/math/floormod)
**Compat aliases for migration**

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

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

<br />

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

true, this follows Python semantics in that the result here is consistent
with a flooring divide. E.g. `floor(x / y) * y + mod(x, y) = x`.

> [!NOTE]
> **Note:** [`math.floormod`](https://www.tensorflow.org/versions/r2.1/api_docs/python/tf/math/floormod) supports broadcasting. More about broadcasting [here](http://docs.scipy.org/doc/numpy/user/basics.broadcasting.html)

<br />

<br />

<br />

| ## Args ||
|---|---|
| `x` | A `Tensor`. Must be one of the following types: `int32`, `int64`, `bfloat16`, `half`, `float32`, `float64`. |
| `y` | A `Tensor`. Must have the same type as `x`. |
| `name` | A name for the operation (optional). |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| A `Tensor`. Has the same type as `x`. ||

<br />