Skip to content

I'm unhappy about the way primeFactors handles negative numbers. #6

@kindaro

Description

@kindaro

Expected: Negative numbers are factored so that there are some prime numbers in the output and perhaps a (-1).

Actual: Negative numbers are returned as a singleton list.

Example:

> primeFactors 100
[2,2,5,5]
> primeFactors (-100)
[-100]

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