Hullo hullo,
If I wanted to manipulate: 72057594037927936
That could be trouble. Now, to make it shorter, I could convert it to hexadecimal and then write my own mathematical functions.
But, to make it even shorter, technically I could, break it up into base 256, based off of 256 available ASCII values (using an array of characters, one for each "digit").
So, that long number above would merely be:
char base256[7] = {chr(255), chr(0), chr(0), chr(0), chr(0), chr(0), chr(0)};
And thus, multiplication between 7 digits should take a lot less time than multiplication of 18 digits. This is my thought-process going into this situation, but I've never really worked with my "own" algorithms for numbers of base 256, so I'm just wondering if there's something inherently wrong with going about it this way?



LinkBack URL
About LinkBacks




To use LN, the number has to be representable, but if it's representable, then it's small enough that we don't really need LN (Is what I'm expecting)