Skip to content

Inconsistency between documentation and code implementation #349

@YichiZhang0613

Description

@YichiZhang0613

I noticed a possible inconsistency between documentation and code implementation in uint/src/algorithms/gcd/matrix.rs. The details can be found in the following code. The document require checking r1 >= r0, but the actual check is r0 >= r1

    /// # Panics
    ///
    /// Panics if `r1 < r0`.
    // OPT: Would this be faster using extended binary gcd?
    // See <https://en.algorithmica.org/hpc/algorithms/gcd>
    #[inline]
    #[must_use]
    pub fn from_u64(mut r0: u64, mut r1: u64) -> Self {
        debug_assert!(r0 >= r1);

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationto doTo be done

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions