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

negative $n in “combinations” (combinations -999999999999999999, 2) #5196

Closed
p6rt opened this issue Mar 24, 2016 · 4 comments
Closed

negative $n in “combinations” (combinations -999999999999999999, 2) #5196

p6rt opened this issue Mar 24, 2016 · 4 comments

Comments

@p6rt
Copy link

p6rt commented Mar 24, 2016

Migrated from rt.perl.org#127778 (status was 'resolved')

Searchable as RT127778$

@p6rt
Copy link
Author

p6rt commented Mar 24, 2016

From @AlexDaniel

Code​:
.say for combinations -999999999999999999, 2

Result​:
(no output)

� That's fine!

Code​:
.say for combinations -9999999999999999999, 2

Result​:
(0 1)
(0 2)
(0 3)
(0 4)
(0 5)
� and so on�

� now that's a problem.

@p6rt
Copy link
Author

p6rt commented Apr 11, 2016

From @usev6

This works consistently now​:

$ perl6-m -e '.say for combinations -9999999999999999999, 2'
()

$ perl6-m -e '.say for combinations -999999999999999999, 2'
()

Calling combinations with a negative $k gives an empty list​:

$ perl6-m -e 'say combinations 4, -2'
()

I added tests for this behaviour to S32-list/combinations.t with commit Raku/roast@132d97ffc9

I'm closing this ticket as 'resolved'.

1 similar comment
@p6rt
Copy link
Author

p6rt commented Apr 11, 2016

From @usev6

This works consistently now​:

$ perl6-m -e '.say for combinations -9999999999999999999, 2'
()

$ perl6-m -e '.say for combinations -999999999999999999, 2'
()

Calling combinations with a negative $k gives an empty list​:

$ perl6-m -e 'say combinations 4, -2'
()

I added tests for this behaviour to S32-list/combinations.t with commit Raku/roast@132d97ffc9

I'm closing this ticket as 'resolved'.

@p6rt p6rt closed this as completed Apr 11, 2016
@p6rt
Copy link
Author

p6rt commented Apr 11, 2016

@usev6 - Status changed from 'new' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant