Created
November 13, 2020 18:27
-
-
Save Altreus/2d3a71fdd7842f3d76c9c61d3afa81ee 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
multi to-base-alphabet ( Real $num, @alphabet, :$precision = -15 ) is export { | |
temp @__base-any-digits = @alphabet; | |
temp $threshold = +@alphabet; | |
say $threshold; | |
return convert-arbitrary-base( $num, $threshold, :$precision ); # 137 | |
} |
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
Cannot resolve caller convert-arbitrary-base(0.1, 4516, :precision(-15)); none of these signatures match: | |
(Int $num, Int $radix where { ... }) | |
(Real $num, Int $radix where { ... }, :$precision) | |
in sub to-base-alphabet at /home/altreus/src/Base-Any/lib/Base/Any.pm6 (Base::Any) line 137 | |
in block <unit> at t/01-basic.t line 66 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment