Skip to content

math CheckPrime is wrong #795

Description

@Julien00859

The current implementation doesn't support:

  • Negative values, -1 is not a prime number. Current implementation raise a TypeError due to math.sqrt on negative values.

The current implementation return the wrong value for:

  • 0, 0 doesn't have any divider, primes must have two.
  • 1, 1 just have one divider, primes must have two.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions