Discuss Scratch

internetpotatowedges
Scratcher
5 posts

Breaking Infinity

Im trying to figure out how to go past the 1024 bit limit, but any already existing engines that go past said limit are too complicated and/or not sight-readable, any help for a simple engine that can go past the 1024 bit limit?

The criteria:
- Must not be too hard to use
- Can surpass the 1024 bit limit
bsteichman
Scratcher
500+ posts

Breaking Infinity

The easiest way I can think of is to store it as a string, like using join blocks, but good luck doing arithmetic on that.

Second would probably be break it up into multiple numbers. if the largest number scratch can register without losing accuracy is 999999999999999 (don't quote me on that), then you can store the digits in orders of ten in a list

199,999,999,999,999,991,999,999,299,999,999,399,999,999,999,994,999,939,999,449

becomes

199999999999999
991999999299999
999399999999999
994999939999449

but any math you do to this would need to “carry” over to the next item


besides that, not 100% sure how to bypass it in scratch



unless you just want a really big number and dont care much about it staying perfectly accurate down to the smaller digits, then I can give you some easier ideas

Last edited by bsteichman (Nov. 19, 2025 03:17:15)

knacktick
Scratcher
100+ posts

Breaking Infinity

what's the bit limit?, do you mean like the maximum size for variables?

Last edited by knacktick (Nov. 19, 2025 05:25:56)

ploppiedog
Scratcher
15 posts

Breaking Infinity

If you're having a bit issue, try using a scientific notation system (1e2, 7e3, etc.) and then if you want to compare numbers, compare the number after the e and then the number before it (example: if you want to compare 1e7 and 2e9 with code, make it so that the code can check the e7 and e9 and figure out that 2e9 is greater than 1e7. If both are the same, check the number before the e)

If you're still having trouble understanding scientific notation, click here: https://en.wikipedia.org/wiki/Scientific_notation
internetpotatowedges
Scratcher
5 posts

Breaking Infinity

knacktick wrote:

what's the bit limit?, do you mean like the maximum size for variables?
A bit limit is the maximum for any amount of bits in binary, in binary, bits are either a 0 or a 1, to find a bit limit in the decimal system of numbers, you find the predecessor to any value 2^k, where k is any natural number.
kemlevor
Scratcher
78 posts

Breaking Infinity

you can store very big numbers on variables or list but can't use operators given by scratch because of its limit of 1e308 (~4e308 for more precision) and the regular way to store float type element. float can only store 16 digits (with 64 bits)
you can't change the amount of bits used by scratch in operation.
but, you can code your own operators such as +, -, x or / (or more). I've already coded + and x (+ don't carry fractional form but x does, i'll fix it later).
you must have to work on your numbers as they were string type.

Powered by DjangoBB