4 ms·
>That means using 256/5 = 51.2 bits of each word. Why must each word have the same amount? Why not 64 bits on the top word, and 48 bits on the other 4 words?
by Thorrez 1y ago
>That means using 256/5 = 51.2 bits of each word.
Why must each word have the same amount? Why not 64 bits on the top word, and 48 bits on the other 4 words?
- LegionMammal978 1y agoEvenly distributing the number of bits per word lets you chain more additions/subtractions before having to normalize.
- xigoi 1y agoSure, but the point is that for the most significant limb, there is no point in having redundant bits because whatever you put in them will be discarded after normalization.
- LegionMammal978 1y agoAh, in that case, you're right, it would make sense to use all 64 bits for the top limb. Still, making them all equal-sized can have benefits if you use SIMD or similar techniques to operate on them uniformly. One project of mine has been trying to work with large integers in CUDA by distributing their limbs across a warp.
- dgoldstein0 1y agoMaybe some use cases want to know if there was overflow? In which case having more space for carry bits to accumulate makes it easy to give an accurate answer