Skip to content

math/big: Typo in the documentation of Int.DivMod #13875

@Tom-Coates

Description

@Tom-Coates

The documentation for DivMod, in the big library, suggests that z.DivMod(x,y,w) sets z to the quotient q and w to the modulus m, where q and m satisfy

m = x - y*q with 0 <= m < |q|

I believe that this should read

m = x - y*q with 0 <= m < |y|

so that it agrees with the reference mentioned in the documentation for DivMod: Raymond T. Boute, “The Euclidean definition of the functions div and mod”. ACM Transactions on Programming Languages and Systems (TOPLAS), 14(2):127-144, New York, NY, USA, 4/1992. ACM press.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions