IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /docs/manual/basics.md). For the complete Mojo documentation index, see llms.txt.
Skip to main content
Version: 1.0
For the complete Mojo documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /docs/manual/basics.md).

divmod

divmod[T: DivModable](numerator: T, denominator: T) -> Tuple[T, T]

Performs division and returns the quotient and the remainder.

Parameters:

  • T (DivModable): A type conforming to the DivModable trait.

Args:

  • numerator (T): The dividend.
  • denominator (T): The divisor.

Returns:

Tuple[T, T]: A Tuple containing the quotient and the remainder.