In this exercise we are required to implement 7 basic 'unsigned integer' arithmetic functions in base-63:
- to63(x) - converts an integer from base-10 to base-63.
- to10(x) - converts an integer from base-63 to base-10.
- add(x,y) - adds two base-63 integers.
- sub(x,y) - subtracts two base-63 integers.
- mul(x,y) - multiplies two base-63 integers.
- div(x,y) - performs integer division between two base-63 integers.
- mod(x,y) - returns the remainder of division between two base-63 integers.
NOTES:
- All outputs shall be char-string format.
- Except for the function 'to63' (which may input numbers), all inputs shall be in char-string format.
- Use the numerals '0' to '9' for digits 0 to 9, capital letters 'A' to 'Z' for digits 10 to 35, lower case letters 'a' to 'z' for digits 36 to 61 and the symbol '_' (underscore) for digit 62.
Solution Stats
Problem Comments
1 Comment
Solution Comments
Show comments
Loading...
Problem Recent Solvers4
Suggested Problems
-
Find the maximum number of decimal places in a set of numbers
3499 Solvers
-
Usage of java.math : N Choose K with unlimited precision
52 Solvers
-
Integer sequence - 2 : Kolakoski sequence
198 Solvers
-
127 Solvers
-
Find two triangular numbers whose sum is input.
103 Solvers
More from this Author116
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
As far as I can tell, the template solution is useless to even frame the answer. After I figured out how to frame the solution, I found this which might help (MATLAB Staff solution, not Xiangrui Xi's solution).
https://www.mathworks.com/matlabcentral/answers/100539-how-can-i-access-subfunctions-from-outside-the-main-function-in-matlab