[NOTE: read notes and credits] => Click See Inside for the "str.add () () " block. The output gets saved to "str.out" variable. Use with credit! :) => When you run this project, it will create two (200,000 digits long) positive integers and add them using the str.add ()() block. It will subsequently show the time for computation. You can experiment with different digit lengths. Adding very large numbers may not work, because too many digits can't be displayed in the say bubble. => You can add two positive integers as per your choice by clicking the sprite. Wait before the original task of addition time is computed; You may also do this by stopping the project and clicking. => Because of a js related quirk that is somewhat less known, if you use prefix notations like 0b, 0x or 0o, it will just convert it to decimal system and work fine. Please keep in mind that characters are separated into chunks of length 9 before operations. That is why longer inputs with prefix notations don't work.
If you have any suggestions, feel free to comment, or if you have any optimization tips, please visit this topic: https://scratch.mit.edu/discuss/topic/863839 [NOTE: Works ONLY for non-negative integers.] ========================== • If you use it in built-in operators for numbers, scratch will either: 1. Round off(and ignore digits at a smaller place value) 2. Convert to standard notation (after 10^21) 3. Assume as Infinity (after 1.8*10^308, which is 64-bit float max. limit) This deals with the issue by first taking the addends, creating 9-digit segments, adding them normally, and finally assembling all resulting segments together. Thus, the output is just a string, not an integer. • Therefore, if you want to use this output sum in another script, you should only use it with string operations (e.g. join ()(), letter () of (), etc.) Using arithmetic operators will make it one from the three forms given above. This happens because scratch will treat it as an integer, wasting all efforts :p