TAOCP 4.3.1 Exercise 5
Something went wrong.
Section 4.3.1: The Classical Algorithms
Exercise 5. [21] Algorithm A adds the two inputs by going from right to left, but sometimes the data is more readily accessible from left to right. Design an algorithm that produces the same answer as Algorithm A, but that generates the digits of the answer from left to right, going back to change previous values if a carry occurs to make a previous value incorrect. [Note: Early Hindu and Arabic manuscripts dealt with addition from left to right in this way, probably because it was customary to work from left to right on an abacus; the right-to-left addition algorithm was a refinement due to al-Uqlidisi, perhaps because Arabic is written from right to left.]
Verified: no
Solve time: 5m13s
Something went wrong. If this issue persists please contact us through our help center at help.openai.com.