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

To range on Infinity for BigInt #8

Closed
Jack-Works opened this issue Feb 26, 2019 · 8 comments · Fixed by #23
Closed

To range on Infinity for BigInt #8

Jack-Works opened this issue Feb 26, 2019 · 8 comments · Fixed by #23
Labels
wait for discussion Reasonable idea. Wait for community discussion

Comments

@Jack-Works
Copy link
Member

Related: #7 (comment)

We can range 1 to Infinity now, but we can't range from 1n to Infinity. Because Infinity is not a BigInt.

But there is no representation of Infinity for BigInt. Should we add a speical case for that?

@Jack-Works
Copy link
Member Author

BigInt will not be able to represent Infinity.
Should we add a special case for range?

@hax
Copy link
Member

hax commented Mar 4, 2020

I would vote for yes.

Though Infinity is not a BigInt, bigint < Infinity works and always return true.

@waldemarhorwat
Copy link

I also vote for yes. We intentionally made it fine to compare BigInts and Numbers.

@tabatkins
Copy link

Yes, this should definitely work.

@Jack-Works
Copy link
Member Author

please checkout #23

Jack-Works added a commit that referenced this issue Apr 11, 2020
feat: allow range to inf on bigint, close #8
@Rudxain
Copy link
Contributor

Rudxain commented Oct 26, 2022

I couldn't find an issue that mentioned this. I was (now I'm not) getting worried that we'll never be able to have an "endless" BigInt iterator just because types don't match. BigInts are better suited for infinite sequences than Numbers

@ljharb
Copy link
Member

ljharb commented Oct 26, 2022

@Rudxain #23 allows BigInt.range(Infinity), to my reading.

@Rudxain
Copy link
Contributor

Rudxain commented Oct 26, 2022

#23 allows BigInt.range(Infinity)

I know, I just wanted to post my thoughts about this (even though the issue is old, and has been closed by that PR).

I sometimes like to visit old posts on forums, GH issues, and social media, specially if I want to say something that hasn't been said by someone else

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wait for discussion Reasonable idea. Wait for community discussion
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants