Skip to content

Some bugs #2

@danaj

Description

@danaj

in phi(n), "return amount" is indented improperly, making phi(n) = 1 for all n.

in step3(n,r) the range is set to (r,2) instead of (2,r). This means the required trial division does not happen.

In both step3 and step5 you need to make sure your range includes the value.

In step5, um, what? You're setting x to an integer value and then just doing a modular exponentiation. That isn't how it works.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions