Skip Menu |
Report information
Id: 125800
Status: open
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: lue <rnddim [at] gmail.com>
Cc:
AdminCc:

Severity: (no value)
Tag: (no value)
Platform: (no value)
Patch Status: (no value)
VM: (no value)



Subject: :radix[] form allows too-large place values
Download (untitled) / with headers
text/plain 283b
<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.
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:
Show quoted text
> <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.




This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org