Last active
December 19, 2015 15:29
-
-
Save diakopter/5976904 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sub ndr(Int *@vals, Int :$radix = 10) { | |
die "radix must be positive" unless $radix > 0; | |
1+floor log (1 max [max] @vals>>.abs), $radix | |
}; | |
say ndr(4,5,6,:radix(2)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment