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

Rat.Range includes Infs when it shouldn't (Rat.Range) #5926

Closed
p6rt opened this issue Dec 28, 2016 · 7 comments
Closed

Rat.Range includes Infs when it shouldn't (Rat.Range) #5926

p6rt opened this issue Dec 28, 2016 · 7 comments

Comments

@p6rt
Copy link

p6rt commented Dec 28, 2016

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

Searchable as RT130427$

@p6rt
Copy link
Author

p6rt commented Dec 28, 2016

From @AlexDaniel

Similarly to https://rt-archive.perl.org/perl6/Ticket/Display.html?id=126990

Code​:
say Rat.Range

Result​:
-Inf..Inf

But you cannot store Infs in a Rat, therefore it should be -Inf^..^Inf (just like Int.Range).

@p6rt
Copy link
Author

p6rt commented Dec 28, 2016

From @lizmat

Fixed with 347271d214198a700, tests needed

On 28 Dec 2016, at 21​:29, Aleks-Daniel Jakimenko-Aleksejev (via RT) <perl6-bugs-followup@​perl.org> wrote​:

# New Ticket Created by Aleks-Daniel Jakimenko-Aleksejev
# Please include the string​: [perl #​130427]
# in the subject line of all future correspondence about this issue.
# <URL​: https://rt-archive.perl.org/perl6/Ticket/Display.html?id=130427 >

Similarly to https://rt-archive.perl.org/perl6/Ticket/Display.html?id=126990

Code​:
say Rat.Range

Result​:
-Inf..Inf

But you cannot store Infs in a Rat, therefore it should be -Inf^..^Inf (just like Int.Range).

@p6rt
Copy link
Author

p6rt commented Dec 28, 2016

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Dec 29, 2016

From @zoffixznet

Tests added in Raku/roast@99f7d695a6

1 similar comment
@p6rt
Copy link
Author

p6rt commented Dec 29, 2016

From @zoffixznet

Tests added in Raku/roast@99f7d695a6

@p6rt
Copy link
Author

p6rt commented Dec 29, 2016

@zoffixznet - Status changed from 'open' to 'resolved'

@p6rt p6rt closed this as completed Dec 29, 2016
@p6rt
Copy link
Author

p6rt commented Dec 31, 2016

From @zoffixznet

On Wed, 28 Dec 2016 12​:29​:51 -0800, alex.jakimenko@​gmail.com wrote​:

Similarly to https://rt-archive.perl.org/perl6/Ticket/Display.html?id=126990

Code​:
say Rat.Range

Result​:
-Inf..Inf

But you cannot store Infs in a Rat, therefore it should be -Inf^..^Inf
(just like Int.Range).

Turns out Infs *are* in Rational range. So I undid the fix and added .Range to FatRats too

Rakudo commit​: rakudo/rakudo@b3ab375
Tests change​: Raku/roast@96cca2d5bb

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