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

:radix[] form allows too-large place values #4469

Open
p6rt opened this issue Aug 13, 2015 · 3 comments
Open

:radix[] form allows too-large place values #4469

p6rt opened this issue Aug 13, 2015 · 3 comments

Comments

@p6rt
Copy link

p6rt commented Aug 13, 2015

Migrated from rt.perl.org#125800 (status was 'open')

Searchable as RT125800$

@p6rt
Copy link
Author

p6rt commented Aug 13, 2015

From @ShimmerFairy

<ShimmerFairy> m​: say :16[16]
<camelia> rakudo-moar 98df93​: OUTPUT«16␤»
<ShimmerFairy> m​: say :16[1, 16]
<camelia> rakudo-moar 98df93​: OUTPUT«32␤»

Essentially, rakudo does the math on this form of radix without checking its place values if they're valid for the given radix.

@p6rt
Copy link
Author

p6rt commented Dec 3, 2017

From @AlexDaniel

I'm not entirely sure what is supposed to happen there.

With just one argument it acts as a pass-thru​:
say :16[16] # OUTPUT​: «9999»

And with two values it seems to do the math correctly​:

say :16[1,9999] # OUTPUT​: «10015»

So what should be done exactly? Should we just error out on too-large values (even though it seems to be functional)?

On 2015-08-13 03​:25​:44, lue wrote​:

<ShimmerFairy> m​: say :16[16]
<camelia> rakudo-moar 98df93​: OUTPUT«16␤»
<ShimmerFairy> m​: say :16[1, 16]
<camelia> rakudo-moar 98df93​: OUTPUT«32␤»

Essentially, rakudo does the math on this form of radix without
checking its place values if they're valid for the given radix.

@p6rt
Copy link
Author

p6rt commented Dec 3, 2017

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

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