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

255.base(16, -666) and friends #4479

Closed
p6rt opened this issue Aug 15, 2015 · 4 comments
Closed

255.base(16, -666) and friends #4479

p6rt opened this issue Aug 15, 2015 · 4 comments

Comments

@p6rt
Copy link

p6rt commented Aug 15, 2015

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

Searchable as RT125819$

@p6rt
Copy link
Author

p6rt commented Aug 15, 2015

From @AlexDaniel

Code​:
say 255.base(16, -100);

Result​:
FF.

Docs say (http://doc.perl6.org/routine/base#role_Real)​:
“The optional $digits argument asks for that many digits of fraction (which
may not be negative).”
So there is something wrong.

And also our classic stuff​:
Code​:
say 255.base(16, 9999999999999999999999999999999999999999999999999);

Result​:
repeat count (-537617205517352961) cannot be negative
  in block <unit> at ./test.pl​:2

Code​:
say 255.base(16,
9999999999999999999999999999999999999999999999999999999999999999999999999);

Result​:
repeat count (-1) cannot be negative
  in block <unit> at ./test.pl​:2

@p6rt
Copy link
Author

p6rt commented Dec 12, 2016

From @AlexDaniel

This is already resolved.

The first one seems to be resolved by this​: rakudo/rakudo@5746df2

The second problem was resolved by this bump (not sure what actual commit though)​: rakudo/rakudo@23b3d29

Tests needed.

On 2015-08-14 21​:59​:43, alex.jakimenko@​gmail.com wrote​:

Code​:
say 255.base(16, -100);

Result​:
FF.

Docs say (http://doc.perl6.org/routine/base#role_Real)&#8203;:
“The optional $digits argument asks for that many digits of fraction (which
may not be negative).”
So there is something wrong.

And also our classic stuff​:
Code​:
say 255.base(16, 9999999999999999999999999999999999999999999999999);

Result​:
repeat count (-537617205517352961) cannot be negative
in block <unit> at ./test.pl​:2

Code​:
say 255.base(16,
9999999999999999999999999999999999999999999999999999999999999999999999999);

Result​:
repeat count (-1) cannot be negative
in block <unit> at ./test.pl​:2

@p6rt
Copy link
Author

p6rt commented Dec 16, 2016

@p6rt
Copy link
Author

p6rt commented Dec 16, 2016

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

@p6rt p6rt closed this as completed Dec 16, 2016
@p6rt p6rt added the testneeded label Jan 5, 2020
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