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.
[null,null,["Last updated 2024-04-26 UTC."],[],[],null,["# tf.math.floordiv\n\n\u003cbr /\u003e\n\n|------------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.16.1/tensorflow/python/ops/math_ops.py#L1628-L1655) |\n\nDivides `x / y` elementwise, rounding toward the most negative integer.\n\n#### View aliases\n\n\n**Compat aliases for migration**\n\nSee\n[Migration guide](https://www.tensorflow.org/guide/migrate) for\nmore details.\n\n[`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)\n\n\u003cbr /\u003e\n\n tf.math.floordiv(\n x, y, name=None\n )\n\nMathematically, this is equivalent to floor(x / y). For example:\nfloor(8.4 / 4.0) = floor(2.1) = 2.0\nfloor(-8.4 / 4.0) = floor(-2.1) = -3.0\nThis is equivalent to the '//' operator in Python 3.0 and above.\n| **Note:** `x` and `y` must have the same type, and the result will have the same type as well.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|--------|--------------------------------------------|\n| `x` | `Tensor` numerator of real numeric type. |\n| `y` | `Tensor` denominator of real numeric type. |\n| `name` | A name for the operation (optional). |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ------- ||\n|---|---|\n| `x / y` rounded toward -infinity. ||\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Raises ------ ||\n|-------------|----------------------------|\n| `TypeError` | If the inputs are complex. |\n\n\u003cbr /\u003e"]]