Discuss Scratch

RobloxLover2015
Scratcher
19 posts

Can I make numbers over 1.79e308?

Yo, can someone tell me the code that I need to make numbers over
(1.79) * ([10^] of (308))
. Can anyone tell me how?
CatsUnited
Scratcher
1000+ posts

Can I make numbers over 1.79e308?

Not sure why you want to deal with numbers that large, but I was able to get the 1.79 up to 1.797693 without it becoming infinity.
RobloxLover2015
Scratcher
19 posts

Can I make numbers over 1.79e308?

1.797693e308 looks like the limit. Can I go any past that? I need the code/
Flowermanvista
Scratcher
1000+ posts

Can I make numbers over 1.79e308?

Unfortunately, storing numbers beyond ~1.797693e308 is fundamentally impossible because that number is the largest number that a double precision floating point number can store.

Double precision floating point numbers, also known as double floats or just doubles, are a commonly used type of number in computing that provides around 15 to 17 digits of precision with positive and negative numbers in ranges anywhere from around 2e-1022 to 2e1023. It is fundamentally impossible to exceed these limits with a double float because in the 64-bit long number, only 11 bits are allocated for indicating the exponent. The 64th bit is the sign bit, and the other 52 bits store the fraction.

Double floats are commonly used because of their incredible versatility, and they are the only available number format in JavaScript, the language that Scratch was written in. Double floats were also the number format of choice in Scratch 1.x and 2.x. It's unlikely that Scratch will use any other number format because of the reason I specified.
RobloxLover2015
Scratcher
19 posts

Can I make numbers over 1.79e308?

There's also 1.8e308.
WindOctahedron
Scratcher
1000+ posts

Can I make numbers over 1.79e308?

RobloxLover2015 wrote:

There's also 1.8e308.
That's approximately 1.797693e308, which is the number Flowermanvista is talking about.
45afc4td
Scratcher
100+ posts

Can I make numbers over 1.79e308?

The maximum 64-bit float number is 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368. If you need more, support the float override suggestion, as 80-bit float and 128-bit float both have a larger range of about 1.1897×10⁴⁹³², and 256-bit float has a range of about 1.6113×10⁷⁸⁹¹³.
RobloxLover2015
Scratcher
19 posts

Can I make numbers over 1.79e308?

Why not 512 bit float?
45afc4td
Scratcher
100+ posts

Can I make numbers over 1.79e308?

RobloxLover2015 wrote:

Why not 512 bit float?
There isn't an official 512-bit float standard mentioned at https://en.wikipedia.org/wiki/Template:Floating-point , but the float override suggestion does include the ability to set a custom float. The calculations will probably get slower with more significant places though. In a custom float, the range and the amount of significant places could be set independently, so in theory it's possible to make a custom float that goes up to 2^2^128 but only has 16 significant bits.
RobloxLover2015
Scratcher
19 posts

Can I make numbers over 1.79e308?

Then what's the code for making numbers larger than 1.79e308?
RobloxLover2015
Scratcher
19 posts

Can I make numbers over 1.79e308?

Like just how
all at once

end
was removed…
Flowermanvista
Scratcher
1000+ posts

Can I make numbers over 1.79e308?

RobloxLover2015 wrote:

Then what's the code for making numbers larger than 1.79e308?
There is none - read my post again. With the way Scratch is currently coded, storing numbers larger than that is fundamentally impossible.
RobloxLover2015
Scratcher
19 posts

Can I make numbers over 1.79e308?

Well, it's possible: just with ONE or TWO or many custom blocks!
45afc4td
Scratcher
100+ posts

Can I make numbers over 1.79e308?

Arbitrary precision integer:
delete (all v) of [32-bit integer array v]
repeat (64)
add [4294967295] to [32-bit integer array v]

Technically 2^2048-1 is stored this way, but implementing multiplication and division, let alone sine, cosine, tangent, exponentation gets complicated. Not to mention displaying it as decimal.

Last edited by 45afc4td (Nov. 24, 2019 18:06:02)

RobloxLover2015
Scratcher
19 posts

Can I make numbers over 1.79e308?

Thank, but what about 2^4096-1?
coder2045
Scratcher
1000+ posts

Can I make numbers over 1.79e308?

RobloxLover2015 wrote:

Thank, but what about 2^4096-1?
Why do you need numbers so big?
coder2045
Scratcher
1000+ posts

Can I make numbers over 1.79e308?

45afc4td wrote:

Arbitrary precision integer:
delete (all v) of [32-bit integer array v]
repeat (64)
add [4294967295] to [32-bit integer array v]

Technically 2^2048-1 is stored this way, but implementing multiplication and division, let alone sine, cosine, tangent, exponentation gets complicated. Not to mention displaying it as decimal.
That's just going to make a list like this:
zsefbhuk1
Scratcher
100+ posts

Can I make numbers over 1.79e308?

BigNumberGuy111
Scratcher
5 posts

Can I make numbers over 1.79e308?

technically , you can with 2 variables while 1 is the exponent of the other one
RobloxLover2015
Scratcher
19 posts

Can I make numbers over 1.79e308?

I resolved this by sharing a project called “What Do You Mean Game”. I use my large number generator, which can go up to 9.999999999999x10^(2^1024).
How?
You just do this.
when green flag clicked
set [order v] to [1]
set [mat v] to [0]
forever
change [order v] by (order)
if <(order) > (9.9999999999)> then
set [order v] to ((order) / (10))
change [mat v] by (1)
end

Last edited by RobloxLover2015 (Feb. 8, 2020 09:51:51)

Powered by DjangoBB