quotientRemainder(x, y)This returns a sequence containing both the quotient and remainder when dividing the first argument by the second. Note that the return value is a Macaulay2 sequence and not a Python tuple. This makes it useful with parallel assignment.
|
|
|
If one of the arguments is a Macaulay2 object, then it is first converted to a Python object before dividing.
|
|
Note that the behavior of this function for integers differs between Macaulay2 and Python. In particular, in Macaulay2, the quotient is rounded down when y is positive and up when it is negative, and the remainder is always nonnegative. In Python, the quotient is always rounded down and the remainder will have the same sign as y.
|
|
The source of this document is in Python/doc/arithmetic.m2:731:0.