News for hackers. Stuff that matters.
Re:Adding BigInts to V8 by delinka on Thursday May 03, 2018 @09:10AM (#16985629)
"...the two numbers being multiplied are not the same length."

Do you mean as counted in bits? If so, prepend zeroes until they are the same length. Does this negatively affect the algorithm's results?

EDIT: When I say 'prepend' I mean on the MSB end. In typical arithmetic on paper, that'd be adding leading zeroes (prepending) onto the numbers.

Re:Adding BigInts to V8 by taejo on Friday May 04, 2018 @08:11AM (#16993907)
You can do that - it's the "textbook" solution - but you can probably do better by not making your inputs larger: in the worst case you're going from multiplying N digits by 1 digit to N digits by N digits.