I have very large numbers (million digits).
number = A*10^partlen + B
As of now, I split the numbers by this way:
TotalLen = IntegerLength[a]; partlen = IntegerPart[TotalLen/2]; Print[First[Timing[A = IntegerPart[number/(10^partlen )]]]]; Print[First[Timing[B = Mod[number, 10^partlen ]]]] And the timings for a 6 million digits number are:
4.703 0.36 Converting the number to strings and rebuilding the parts is even slower than this.
Is there any faster way?
Mod[]'s partnerQuotient[], aren't you? For that matter, have you seenQuotientRemainder[]? $\endgroup$