Discuss Scratch

MathWizz
Scratcher
100+ posts

Variable Limit

There is no limit on the number of variables.

running Chromium 42.0.2311.90 with Flash Player 15.0.0.189 on Arch Linux 3.19.5-1-ck
MathWizzJsScratch && sb.js & Amber (coming soon! maybe)
comp09
Scratcher
1000+ posts

Variable Limit

Variables aren't limited - you can insert a million single characters into a list, and use the list block
(list :: list)
to insert it into a variable. The
(join [hello] [world])
block however has an artificial limit of 10240 characters.

Last edited by comp09 (Oct. 11, 2015 13:18:10)



Visit the website of Andrew Sun!


herohamp
Scratcher
1000+ posts

Variable Limit

comp09 wrote:

Variables aren't limited - you can insert a million single characters into a list, and use the list block
(list :: list)
to insert it into a variable. The
(join [hello] [world])
block however has an artificial limit of 10240 characters.
Ya I can find Grahams Number!
PullJosh
Scratcher
1000+ posts

Variable Limit

herohamp wrote:

comp09 wrote:

Variables aren't limited - you can insert a million single characters into a list, and use the list block
(list :: list)
to insert it into a variable. The
(join [hello] [world])
block however has an artificial limit of 10240 characters.
Ya I can find Grahams Number!
Things tend to get wonky once you get working with massive numbers.

Just keep that in mind.
NickyNouse
Scratcher
1000+ posts

Variable Limit

If you're talking about numbers, eventually they switch to E notation, which loses accuracy but keeps the size of the number. Then, when you get to a number with like 60+ 0's (or something, I haven't actually checked) it says “Infinity”

Edit: oop, ninja'd

Last edited by NickyNouse (Oct. 14, 2015 22:02:11)

PullJosh
Scratcher
1000+ posts

Variable Limit

NickyNouse wrote:

If you're talking about numbers, eventually they switch to E notation, which loses accuracy but keeps the size of the number. Then, when you get to a number with like 60+ 0's (or something, I haven't actually checked) it says “Infinity”
Yeah, Graham's Number will definitely be passing the “Infinity” mark.

Doing this is difficult even with a powerful typed language. With a supercomputer. For a really long time.
thisandagain
Forum Moderator
500+ posts

Variable Limit

herohamp wrote:

What is the max limit for a normal variable.

Today, the *value* of variables in Scratch are generally limited to what are called “double-precision floats”. This value is defined in the technical standards for Floating-Point Arithmetic provided by the Institute of Electrical and Electronics Engineers (IEEE) as “IEEE 754”. What is interesting about this is that the value can vary from computer to computer depending on architecture. The shorter answer to your question is that the maximum value for a variable in Scratch is approximately 1.79e+308. As @PullJosh mentioned though, when working with really large numbers things can get a little wonky. ;-)

You can read all about IEEE 754 here:
https://en.wikipedia.org/wiki/IEEE_floating_point

You can read all about the Double-Precision Floating Point Format here:
https://en.wikipedia.org/wiki/Double-precision_floating-point_format
herohamp
Scratcher
1000+ posts

Variable Limit

thisandagain wrote:

herohamp wrote:

What is the max limit for a normal variable.

Today, the *value* of variables in Scratch are generally limited to what are called “double-precision floats”. This value is defined in the technical standards for Floating-Point Arithmetic provided by the Institute of Electrical and Electronics Engineers (IEEE) as “IEEE 754”. What is interesting about this is that the value can vary from computer to computer depending on architecture. The shorter answer to your question is that the maximum value for a variable in Scratch is approximately 1.79e+308. As @PullJosh mentioned though, when working with really large numbers things can get a little wonky. ;-)

You can read all about IEEE 754 here:
https://en.wikipedia.org/wiki/IEEE_floating_point

You can read all about the Double-Precision Floating Point Format here:
https://en.wikipedia.org/wiki/Double-precision_floating-point_format
Thank you
CatsUnited
Scratcher
1000+ posts

Variable Limit

PullJosh wrote:

Yeah, Graham's Number will definitely be passing the “Infinity” mark.

Doing this is difficult even with a powerful typed language. With a supercomputer. For a really long time.
How many digits are in Graham's Number though?

bottom text
liam48D
Scratcher
1000+ posts

Variable Limit

CatsUnited wrote:

PullJosh wrote:

Yeah, Graham's Number will definitely be passing the “Infinity” mark.

Doing this is difficult even with a powerful typed language. With a supercomputer. For a really long time.
How many digits are in Graham's Number though?
this

For some reason if you leave out the apostrophe Google says 10, which is obviously wrong.

I read this; it was pretty interesting and I think it summed up how big Graham's Number is pretty well.

202e-202e-202e-202e-202e UNI-CODE~~~~~
CatsUnited
Scratcher
1000+ posts

Variable Limit

liam48D wrote:

I read this; it was pretty interesting and I think it summed up how big Graham's Number is pretty well.
Ouch gives me headaches. There are far larger numbers though.
</offtopic>

Last edited by CatsUnited (Oct. 19, 2015 10:18:13)


bottom text
TYdog208
New to Scratch
1 post

Variable Limit

herohamp wrote:

What is the max limit for a normal variable.
BeaconStudiosMaster2
Scratcher
5 posts

Variable Limit

My measurements say 1.7975757575e+308

Powered by DjangoBB