Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
kindaro opened this issue Jan 15, 2018 · 0 comments
Open

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

kindaro opened this issue Jan 15, 2018 · 0 comments

Comments

@kindaro
Copy link

kindaro commented Jan 15, 2018

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]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant